Sha256: 60b25e3e61895b23dc81acb62ecc9e595d51c6418bb37b3acd701b47a9507ae9

Contents?: true

Size: 1.1 KB

Versions: 10

Compression:

Stored size: 1.1 KB

Contents

markdown_settings = {
	previewParserPath:	'/forums/post/preview',
        previewParserVar: 'body',
	onShiftEnter:		{keepDefault:false, openWith:'\n\n'},
	markupSet: [
		{name:'Bold', key:'B', openWith:'**', closeWith:'**'},
		{name:'Underline', key:'U', openWith:'_', closeWith:'_'},
		{separator:' ' },
		{name:'List', openWith:'- ' },
		{name:'Numeric List', openWith:function(markItUp) {
			return markItUp.line+'. ';
		}},
		{separator:' ' },
		{name:'Image', key:'I', replaceWith:'![]([![Url:!:http://]!])'},
		{name:'Link', key:'L', openWith:'[', closeWith:']([![Url:!:http://]!])', placeHolder:'Your text to link here...' },
		{separator:' '},	
		{name:'Quotes', openWith:'> '},
		{name:'Formatted', openWith:'(!(\t|!|`)!)', closeWith:'(!(`)!)'},
		{separator:' '},
		{name:'Preview', call:'preview', className:"preview"}
	]
}

miu = {
	markdownTitle: function(markItUp, char) {
		heading = '';
		n = $.trim(markItUp.selection||markItUp.placeHolder).length;
		for(i = 0; i < n; i++) {
			heading += char;
		}
		return '\n'+heading;
	}
}

function markdown_editor(field) {
  $(field).markItUp(markdown_settings);
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kit_cms-2.3.16 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.15 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.14 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.13 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.11 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.10 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.9 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.8 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.7 app/assets/javascripts/kit/markdown.js
kit_cms-2.3.6 app/assets/javascripts/kit/markdown.js