// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// BBCode tags example
// http://en.wikipedia.org/wiki/Bbcode
// ----------------------------------------------------------------------------
// Feel free to add more tags
// ----------------------------------------------------------------------------

mySettings = {
	nameSpace: 'bbcode',
	previewParserPath: '/forums/preview/',
	previewParserVar: 'data[content]',
	//previewInWindow: 'width=600, height=400, resizable=yes, scrollbars=yes',
	markupSet: [
		{name:'Bold', key:'B', openWith:'[b]', closeWith:'[/b]', className: 'formatBold'},
		{name:'Italic', key:'I', openWith:'[i]', closeWith:'[/i]', className: 'formatItalics'},
		{name:'Underline', key:'U', openWith:'[u]', closeWith:'[/u]', className: 'formatUnderline'},
		{name:'Sub', openWith:'[sub]', closeWith:'[/sub]', className: 'formatSub'},
		{name:'Sup', openWith:'[sup]', closeWith:'[/sup]', className: 'formatSup'},
		{name:'Size', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]', className: 'formatSize',
		dropMenu :[
			{name:'Big', openWith:'[size=29]', closeWith:'[/size]' },
			{name:'Normal', openWith:'[size=18]', closeWith:'[/size]' },
			{name:'Small', openWith:'[size=10]', closeWith:'[/size]' }
		]},
		{name:'Colors', openWith:'[color=[![Color]!]]', closeWith:'[/color]', className: 'formatColors',
		dropMenu: [
			{name:'Yellow', openWith:'[color=yellow]', closeWith:'[/color]', className:"col1-1" },
			{name:'Orange', openWith:'[color=orange]', closeWith:'[/color]', className:"col1-2" },
			{name:'Red', openWith:'[color=red]', closeWith:'[/color]', className:"col1-3" },
			{name:'Blue', openWith:'[color=blue]', closeWith:'[/color]', className:"col2-1" },
			{name:'Purple', openWith:'[color=purple]', closeWith:'[/color]', className:"col2-2" },
			{name:'Green', openWith:'[color=green]', closeWith:'[/color]', className:"col2-3" },
			{name:'White', openWith:'[color=white]', closeWith:'[/color]', className:"col3-1" },
			{name:'Gray', openWith:'[color=gray]', closeWith:'[/color]', className:"col3-2" },
			{name:'Black', openWith:'[color=black]', closeWith:'[/color]', className:"col3-3" }
		]},
		{separator:'---------------' },
		{name:'Align Left', openWith:'[align=left]', closeWith:'[/align]', className: 'formatAlignLeft'},
		{name:'Align Center', openWith:'[align=center]', closeWith:'[/align]', className: 'formatAlignCenter'},
		{name:'Align Right', openWith:'[align=right]', closeWith:'[/align]', className: 'formatAlignRight'},
		{name:'Bulleted list', openWith:'[list]\n', closeWith:'\n[/list]', className: 'formatList'},
		//{name:'Numeric list', openWith:'[list=[![Starting number]!]]\n', closeWith:'\n[/list]'}, 
		{name:'List item', openWith:'[li]', closeWith:'[/li]', className: 'formatListItem'},
		{separator:'---------------' },
		{name:'Picture', key:'P', replaceWith:'[img][![Url]!][/img]', className: 'formatImage'},
		{name:'Link', key:'L', openWith:'[url=[![Url]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...', className: 'formatLink'},
		{name:'Code', openWith:'[code]', closeWith:'[/code]', className: 'formatCode'}, 
		{name:'Quotes', openWith:'[quote]', closeWith:'[/quote]', className: 'formatQuote'},
		{name:'Blizzard', openWith:'[blizzard]', closeWith:'[/blizzard]', className: 'formatBlizzard'},
		{separator:'---------------' },
		{name:'Clean', className:"formatClean", replaceWith:function(markitup) { return markitup.selection.replace(/\[(.*?)\]/g, "") } },
		//{name:'Preview', className:"formatPreview", call:'preview' }
	]
}
