// -------------------------------------------------------------------
// markItUp!
// -------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// -------------------------------------------------------------------
// Mediawiki Wiki tags example
// -------------------------------------------------------------------
// Feel free to add more tags
// -------------------------------------------------------------------
wiki_image_base_string = '[[Image:{src}|{alt}]]';
//wiki_image_base_string = '[{big_src} [[Image:{src}|{alt}]]]';
wiki_link_base_string = '[{src} {text}]';

wiki_normal = {
	previewParserPath:	'/render_text/wiki/',
	onShiftEnter:		{keepDefault:false, replaceWith:'\n\n'},
	markupSet: [
		{name:'Heading 1', className:'markItUpWikiH1Button', key:'1', openWith:'== ', closeWith:' ==', placeHolder:'Your title here...' },
		{name:'Heading 2', className:'markItUpWikiH2Button', key:'2', openWith:'=== ', closeWith:' ===', placeHolder:'Your title here...' },
		{name:'Heading 3', className:'markItUpWikiH3Button', key:'3', openWith:'==== ', closeWith:' ====', placeHolder:'Your title here...' },
		{name:'Heading 4', className:'markItUpWikiH4Button', key:'4', openWith:'===== ', closeWith:' =====', placeHolder:'Your title here...' },
		{name:'Heading 5', className:'markItUpWikiH5Button', key:'5', openWith:'====== ', closeWith:' ======', placeHolder:'Your title here...' },
		{separator:'---------------' },		
		{name:'Bold', className:'markItUpWikiBoldButton', key:'B', openWith:"'''", closeWith:"'''"}, 
		{name:'Italic', className:'markItUpWikiItalicButton', key:'I', openWith:"''", closeWith:"''"}, 
		{name:'Stroke through', className:'markItUpWikiStrokeButton', key:'S', openWith:'<s>', closeWith:'</s>'}, 
		{separator:'---------------' },
		{name:'Bulleted list', className:'markItUpWikiBulletListButton', openWith:'(!(* |!|*)!)'}, 
		{name:'Numeric list', className:'markItUpWikiNumericListButton', openWith:'(!(# |!|#)!)'}, 
		{separator:'---------------' },
		{name:'Crochet Symbols', className:'markItUpMarkdownCrochetSymbolsButton',
            beforeInsert:function() { 
                $('.markItUpCrochetSymbol').attr('baseString', wiki_image_base_string);
                $("#crochetSymbolsPlugin").modal()
            }
		},
		{name:'Picture', className:'markItUpWikiPictureButton', key:"P", replaceWith:'[[Image:[![Url:!:http://]!]|[![name]!]]]'}, 
		{name:'Link', className:'markItUpWikiLinkButton', key:"L", openWith:"[[![Link]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{name:'Url', className:'markItUpWikiUrlButton', openWith:"[[![Url:!:http://]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{separator:'---------------' },
		{name:'Quotes', className:'markItUpWikiQuoteButton', openWith:'(!(> |!|>)!)', placeHolder:''},
		{name:'Code', className:'markItUpWikiCodeButton', openWith:'(!(<source lang="[![Language:!:php]!]">|!|<pre>)!)', closeWith:'(!(</source>|!|</pre>)!)'}, 
		{separator:'---------------' },
		{name:'Preview', className:'markItUpWikiPreviewButton', call:'preview'}
	]
}

wiki_text_only = {
	previewParserPath:	'/render_text/wiki/',
	onShiftEnter:		{keepDefault:false, replaceWith:'\n\n'},
	markupSet: [
		{name:'Heading 1', className:'markItUpWikiH1Button', key:'1', openWith:'== ', closeWith:' ==', placeHolder:'Your title here...' },
		{name:'Heading 2', className:'markItUpWikiH2Button', key:'2', openWith:'=== ', closeWith:' ===', placeHolder:'Your title here...' },
		{name:'Heading 3', className:'markItUpWikiH3Button', key:'3', openWith:'==== ', closeWith:' ====', placeHolder:'Your title here...' },
		{name:'Heading 4', className:'markItUpWikiH4Button', key:'4', openWith:'===== ', closeWith:' =====', placeHolder:'Your title here...' },
		{name:'Heading 5', className:'markItUpWikiH5Button', key:'5', openWith:'====== ', closeWith:' ======', placeHolder:'Your title here...' },
		{separator:'---------------' },		
		{name:'Bold', className:'markItUpWikiBoldButton', key:'B', openWith:"'''", closeWith:"'''"}, 
		{name:'Italic', className:'markItUpWikiItalicButton', key:'I', openWith:"''", closeWith:"''"}, 
		{name:'Stroke through', className:'markItUpWikiStrokeButton', key:'S', openWith:'<s>', closeWith:'</s>'}, 
		{separator:'---------------' },
		{name:'Bulleted list', className:'markItUpWikiBulletListButton', openWith:'(!(* |!|*)!)'}, 
		{name:'Numeric list', className:'markItUpWikiNumericListButton', openWith:'(!(# |!|#)!)'}, 
		{separator:'---------------' },
		{name:'Crochet Symbols', className:'markItUpMarkdownCrochetSymbolsButton',
            beforeInsert:function() { 
                $('.markItUpCrochetSymbol').attr('baseString', wiki_image_base_string);
                $("#crochetSymbolsPlugin").modal()
            }
		},
		{separator:'---------------' },
		{name:'Quotes', className:'markItUpWikiQuoteButton', openWith:'(!(> |!|>)!)', placeHolder:''},
		{name:'Code', className:'markItUpWikiCodeButton', openWith:'(!(<source lang="[![Language:!:php]!]">|!|<pre>)!)', closeWith:'(!(</source>|!|</pre>)!)'}, 
		{separator:'---------------' },
		{name:'Preview', className:'markItUpWikiPreviewButton', call:'preview'}
	]
}

wiki_library = {
	previewParserPath:	'/render_text/wiki/',
	onShiftEnter:		{keepDefault:false, replaceWith:'\n\n'},
	markupSet: [
		{name:'Heading 1', className:'markItUpWikiH1Button', key:'1', openWith:'== ', closeWith:' ==', placeHolder:'Your title here...' },
		{name:'Heading 2', className:'markItUpWikiH2Button', key:'2', openWith:'=== ', closeWith:' ===', placeHolder:'Your title here...' },
		{name:'Heading 3', className:'markItUpWikiH3Button', key:'3', openWith:'==== ', closeWith:' ====', placeHolder:'Your title here...' },
		{name:'Heading 4', className:'markItUpWikiH4Button', key:'4', openWith:'===== ', closeWith:' =====', placeHolder:'Your title here...' },
		{name:'Heading 5', className:'markItUpWikiH5Button', key:'5', openWith:'====== ', closeWith:' ======', placeHolder:'Your title here...' },
		{separator:'---------------' },		
		{name:'Bold', className:'markItUpWikiBoldButton', key:'B', openWith:"'''", closeWith:"'''"}, 
		{name:'Italic', className:'markItUpWikiItalicButton', key:'I', openWith:"''", closeWith:"''"}, 
		{name:'Stroke through', className:'markItUpWikiStrokeButton', key:'S', openWith:'<s>', closeWith:'</s>'}, 
		{separator:'---------------' },
		{name:'Bulleted list', className:'markItUpWikiBulletListButton', openWith:'(!(* |!|*)!)'}, 
		{name:'Numeric list', className:'markItUpWikiNumericListButton', openWith:'(!(# |!|#)!)'}, 
		{separator:'---------------' },
		{name:'Crochet Symbols', className:'markItUpMarkdownCrochetSymbolsButton',
            beforeInsert:function() { 
                $('.markItUpCrochetSymbol').attr('baseString', wiki_image_base_string);
                $("#crochetSymbolsPlugin").modal();
            }
		},
		{name:'Picture Library', className:'markItUpMarkdownPicutreLibraryButton', 
            beforeInsert:function() { 
                $("#pictureLibraryPlugin").load(
                    '/ajax/picture_library/view/' + pictureLibraryObjectId + "/",
                    function() {
                        $(".pictureLibrarySelection").attr('baseString', wiki_image_base_string);
                        $("#pictureLibraryPlugin").modal();
                    }
                );
            }
        },
		{name:'Picture', className:'markItUpWikiPictureButton', key:"P", replaceWith:'[[Image:[![Url:!:http://]!]|[![name]!]]]'}, 
		{name:'Link', className:'markItUpWikiLinkButton', key:"L", openWith:"[[![Link]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{name:'Url', className:'markItUpWikiUrlButton', openWith:"[[![Url:!:http://]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{separator:'---------------' },
		{name:'Quotes', className:'markItUpWikiQuoteButton', openWith:'(!(> |!|>)!)', placeHolder:''},
		{name:'Code', className:'markItUpWikiCodeButton', openWith:'(!(<source lang="[![Language:!:php]!]">|!|<pre>)!)', closeWith:'(!(</source>|!|</pre>)!)'}, 
		{separator:'---------------' },
		{name:'Preview', className:'markItUpWikiPreviewButton', call:'preview'}
	]
}

wiki_cms_page = {
	previewParserPath:	'/render_text/wiki/',
	onShiftEnter:		{keepDefault:false, replaceWith:'\n\n'},
	markupSet: [
		{name:'Heading 1', className:'markItUpWikiH1Button', key:'1', openWith:'== ', closeWith:' ==', placeHolder:'Your title here...' },
		{name:'Heading 2', className:'markItUpWikiH2Button', key:'2', openWith:'=== ', closeWith:' ===', placeHolder:'Your title here...' },
		{name:'Heading 3', className:'markItUpWikiH3Button', key:'3', openWith:'==== ', closeWith:' ====', placeHolder:'Your title here...' },
		{name:'Heading 4', className:'markItUpWikiH4Button', key:'4', openWith:'===== ', closeWith:' =====', placeHolder:'Your title here...' },
		{name:'Heading 5', className:'markItUpWikiH5Button', key:'5', openWith:'====== ', closeWith:' ======', placeHolder:'Your title here...' },
		{separator:'---------------' },		
		{name:'Bold', className:'markItUpWikiBoldButton', key:'B', openWith:"'''", closeWith:"'''"}, 
		{name:'Italic', className:'markItUpWikiItalicButton', key:'I', openWith:"''", closeWith:"''"}, 
		{name:'Stroke through', className:'markItUpWikiStrokeButton', key:'S', openWith:'<s>', closeWith:'</s>'}, 
		{separator:'---------------' },
		{name:'Bulleted list', className:'markItUpWikiBulletListButton', openWith:'(!(* |!|*)!)'}, 
		{name:'Numeric list', className:'markItUpWikiNumericListButton', openWith:'(!(# |!|#)!)'}, 
		{separator:'---------------' },
		{name:'Crochet Symbols', className:'markItUpMarkdownCrochetSymbolsButton',
            beforeInsert:function() { 
                $('.markItUpCrochetSymbol').attr('baseString', wiki_image_base_string);
                $("#crochetSymbolsPlugin").modal();
            }
		},
		{name:'Picture Library', className:'markItUpMarkdownPicutreLibraryButton', 
            beforeInsert:function() { 
                $("#pictureLibraryPlugin").load(
                    '/ajax/picture_library/view/' + pictureLibraryObjectId + "/",
                    function() {
                        $(".pictureLibrarySelection").attr('baseString', wiki_image_base_string);
                        $("#pictureLibraryPlugin").modal();
                    }
                );
            }
        },
		{name:'Picture', className:'markItUpWikiPictureButton', key:"P", replaceWith:'[[Image:[![Url:!:http://]!]|[![name]!]]]'}, 
		{name:'Internal Link', className:'markItUpMarkdownPageSelectorLinkButton',
            beforeInsert:function() {
                $("#pageSelectorPlugin").load(
                    "/ajax/page_list_selector/",
                    function () {
                        $(".pageListSelection").attr('baseString', wiki_link_base_string);
                        $("#pageSelectorPlugin").modal();
                    }
                );
            }
		},
		{name:'External Link', className:'markItUpWikiLinkButton', key:"L", openWith:"[[![Link]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{name:'Url', className:'markItUpWikiUrlButton', openWith:"[[![Url:!:http://]!] ", closeWith:']', placeHolder:'Your text to link here...' },
		{separator:'---------------' },
		{name:'Quotes', className:'markItUpWikiQuoteButton', openWith:'(!(> |!|>)!)', placeHolder:''},
		{name:'Code', className:'markItUpWikiCodeButton', openWith:'(!(<source lang="[![Language:!:php]!]">|!|<pre>)!)', closeWith:'(!(</source>|!|</pre>)!)'}, 
		{separator:'---------------' },
		{name:'Preview', className:'markItUpWikiPreviewButton', call:'preview'}
	]
}

