Commits

Jannis Leidel  committed 43536e7

Added new ReStructuredText set for markitup.

  • Participants
  • Parent commits 0c86617

Comments (0)

Files changed (18)

File markitup/media/markitup/sets/restructuredtext/images/bold.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/close.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/code.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h1.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h2.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h3.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h4.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h5.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/h6.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/italic.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/link.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/list-bullet.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/list-numeric.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/picture.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/preview.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/images/quotes.png

Added
New image

File markitup/media/markitup/sets/restructuredtext/set.js

+// -------------------------------------------------------------------
+// markItUp!
+// -------------------------------------------------------------------
+// Copyright (C) 2008 Jay Salvat
+// http://markitup.jaysalvat.com/
+// -------------------------------------------------------------------
+// ReStructured Text
+// http://docutils.sourceforge.net/
+// http://docutils.sourceforge.net/rst.html
+// -------------------------------------------------------------------
+// Mark Renron <indexofire@gmail.com>
+// http://www.indexofire.com
+// -------------------------------------------------------------------
+// Jannis Leidel <jannis@leidel.info>
+// http://enn.io
+// -------------------------------------------------------------------
+mySettings = {
+	nameSpace: 'ReST',
+	previewParserPath:	'/markitup/preview/',
+	onShiftEnter: {keepDefault:false, openWith:'\n\n'},
+	onTab: {keepDefault:false, replaceWith:'    '},
+	markupSet: [
+		{name:'Level 1 Heading', key:'1', placeHolder:'Your title Here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '#'); } },
+		{name:'Level 2 Heading', key:'2', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '*'); } },
+		{name:'Level 3 Heading', key:'3', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '='); } },
+		{name:'Level 4 Heading', key:'4', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '-'); } },
+		{name:'Level 5 Heading', key:'5', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '^'); } },
+		{name:'Level 6 Heading', key:'6', placeHolder:'Your title here...', closeWith:function(markItUp) { return miu.markdownTitle(markItUp, '"'); } },
+		{separator:'---------------' },
+		{name:'Bold', key:'B', openWith:'**', closeWith:'**', placeHolder:'Input Your Bold Text Here...'},
+		{name:'Italic', key:'I', openWith:'`', closeWith:'`', placeHolder:'Input Your Italic Text Here...'},
+		{separator:'---------------' },
+		{name:'Bulleted List', openWith:'- ' },
+		{name:'Numeric List', openWith:function(markItUp) { return markItUp.line+'. '; } },
+		{separator:'---------------' },
+		{name:'Picture', key:'P', openWith:'.. image:: ', placeHolder:'Link Your Images Here...'},
+		{name:'Link', key:"L", openWith:'`', closeWith:'`_ \n\n.. _`Link Name`: [![Url:!:http://]!]', placeHolder:'Link Name' },
+		{name:'Quotes', openWith:'    '},
+		{name:'Code', openWith:'\n:: \n\n	 '},
+		{name:'Preview', className:'preview', call:'preview'}
+	]
+};
+
+// mIu nameSpace to avoid conflict.
+miu = {
+	markdownTitle: function(markItUp, character) {
+		heading = '';
+		n = $.trim(markItUp.selection||markItUp.placeHolder).length;
+		for(i = 0; i < n; i++) {
+			heading += character;
+		}
+		return '\n'+heading;
+	}
+};

File markitup/media/markitup/sets/restructuredtext/style.css

+/* -------------------------------------------------------------------
+// ReST!
+// ------------------------------------------------------------------*/
+.ReST .markItUpButton1 a {
+	background-image:url(images/h1.png); 
+}
+.ReST .markItUpButton2 a {
+	background-image:url(images/h2.png); 
+}
+.ReST .markItUpButton3 a {
+	background-image:url(images/h3.png); 
+}
+.ReST .markItUpButton4 a {
+	background-image:url(images/h4.png); 
+}
+.ReST .markItUpButton5 a {
+	background-image:url(images/h5.png); 
+}
+.ReST .markItUpButton6 a {
+	background-image:url(images/h6.png); 
+}
+
+.ReST .markItUpButton7 a {
+	background-image:url(images/bold.png);
+}
+.ReST .markItUpButton8 a {
+	background-image:url(images/italic.png);
+}
+
+.ReST .markItUpButton9 a {
+	background-image:url(images/list-bullet.png);
+}
+.ReST .markItUpButton10 a {
+	background-image:url(images/list-numeric.png);
+}
+
+.ReST .markItUpButton11 a {
+	background-image:url(images/picture.png); 
+}
+.ReST .markItUpButton12 a {
+	background-image:url(images/link.png);
+}
+
+.ReST .markItUpButton13 a	{
+	background-image:url(images/quotes.png);
+}
+.ReST .markItUpButton14 a	{
+	background-image:url(images/code.png);
+}
+
+.ReST .preview a {
+	background-image:url(images/preview.png);
+}