habrahabr.ru
25 Dec '12, 5pm
Markdown разметка в RubyOnRails-приложении: В одном новом проекте, написанном на ruby on rails, была поставлена...
# app/assets/javascripts/posts.js.coffee jQuery -> markdownSettings = { previewParserPath: '/markdown/preview' onShiftEnter: {keepDefault:false, openWith:'\n\n'} markupSet: [ { name:'First Level Heading', key:'1', placeHolder:'Your title here...', closeWith: (markItUp) -> markdownTitle(markItUp, '=') }, { name:'Second Level Heading', key:'2', placeHolder:'Your title here...', closeWith: (markItUp) -> markdownTitle(markItUp, '-') }, {name:'Heading 3', key:'3', openWith:'### ', placeHolder:'Your title here...' } {name:'Heading 4', key:'4', openWith:'#### ', placeHolder:'Your title here...' } {name:'Heading 5', key:'5', openWith:'##### ', placeHolder:'Your title here...' } {name:'Heading 6', key:'6', openWith:'###### ', placeHolder:'Your title here...' } {separator:'---------------' } {name:'Bold', key:'B', openWith:'**', closeWith:'**'} {name:'Italic', key:'I', openWith:'_',...
Full article:
http://habrahabr.ru/company/centosadmin/blog/163947/