// ----------------------------------------------------------------------------
// 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:	'/sfTinyMCE/getPreview', // path to your BBCode parser
	markupSet: [
		{name:'Жирный', key:'B', openWith:'[b]', closeWith:'[/b]'},
		{name:'Курсив', key:'I', openWith:'[i]', closeWith:'[/i]'},
		{name:'Подчеркнутый', key:'U', openWith:'[u]', closeWith:'[/u]'},
		{separator:'---------------' },
		{name:'Картинка', key:'P', replaceWith:'[img][![Url]!][/img]'},
		{name:'Ссылка', key:'L', openWith:'[url href=[![Url]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'},
		{separator:'---------------' },
		{name:'Размер', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]',
		dropMenu :[
			{name:'Большой', openWith:'[size=1.25]', closeWith:'[/size]' },
			{name:'Нормальный', openWith:'[size=1]', closeWith:'[/size]' },
			{name:'Маленький', openWith:'[size=0.75]', closeWith:'[/size]' }
		]},
                {name:'Выравнивание', key:'d', openWith:'[align=[![Text size]!]]', closeWith:'[/align]',
		dropMenu :[
			{name:'Слева', openWith:'[align=left]', closeWith:'[/align]' },
			{name:'Центр', openWith:'[align=center]', closeWith:'[/align]' },
			{name:'Справа', openWith:'[align=right]', closeWith:'[/align]' }
		]},
                {name:'Новая строка', openWith:'[br]'},
		{separator:'---------------' },
		{name:'Список', openWith:'[list]\n', closeWith:'\n[/list]'},
		{name:'Список с номерацией', openWith:'[list=[![Starting number]!]]\n', closeWith:'\n[/list]'},
		{name:'Добавить пункт в список', openWith:'[*] '},
		{separator:'---------------' },
		{name:'Цитата', openWith:'[quote]', closeWith:'[/quote]'},
		{name:'Код', openWith:'[code]', closeWith:'[/code]',
		dropMenu :[
			{name:'PHP', openWith:'[pre class=php]', closeWith:'[/pre]' },
			{name:'JavaScript', openWith:'[pre class=j-script]', closeWith:'[/pre]' },
			{name:'CSS', openWith:'[pre class=css]', closeWith:'[/pre]' },
                        {name:'SQL', openWith:'[pre class=sql]', closeWith:'[/pre]' },
                        {name:'Text', openWith:'[pre class=plain]', closeWith:'[/pre]' }
		]},
		{separator:'---------------' },
		{name:'Отчистить от тегов', className:"clean", replaceWith:function(markitup) { return markitup.selection.replace(/\[(.*?)\]/g, "") } },
		{name:'Предпросмотр', className:"preview", call:'preview' },
                {name:'Сохранить', className:'save', beforeInsert:function(markItUp) { miu.save(markItUp) } }

	]
}


UploadEditorSettings = {nameSpace:'bbcode',

	previewParserPath:	'/sfTinyMCE/getPreview', // path to your BBCode parser
	markupSet: [
		{name:'Жирный', key:'B', openWith:'[b]', closeWith:'[/b]'},
		{name:'Курсив', key:'I', openWith:'[i]', closeWith:'[/i]'},
		{name:'Подчеркнутый', key:'U', openWith:'[u]', closeWith:'[/u]'},
		{separator:'---------------' },
		{name:'Картинка', key:'P', replaceWith:'[img][![Url]!][/img]'},
		{name:'Ссылка', key:'L', openWith:'[url href=[![Url]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'},
		{separator:'---------------' },
		{name:'Размер', key:'S', openWith:'[size=[![Text size]!]]', closeWith:'[/size]',
		dropMenu :[
			{name:'Большой', openWith:'[size=1.25]', closeWith:'[/size]' },
			{name:'Нормальный', openWith:'[size=1]', closeWith:'[/size]' },
			{name:'Маленький', openWith:'[size=0.75]', closeWith:'[/size]' }
		]},
                {name:'Выравнивание', key:'d', openWith:'[align=[![Text size]!]]', closeWith:'[/align]',
		dropMenu :[
			{name:'Слева', openWith:'[align=left]', closeWith:'[/align]' },
			{name:'Центр', openWith:'[align=center]', closeWith:'[/align]' },
			{name:'Справа', openWith:'[align=right]', closeWith:'[/align]' }
		]},
                {name:'Новая строка', openWith:'[br]'},
		{separator:'---------------' },
		{name:'Список', openWith:'[list]\n', closeWith:'\n[/list]'},
		{name:'Список с номерацией', openWith:'[list=[![Starting number]!]]\n', closeWith:'\n[/list]'},
		{name:'Добавить пункт в список', openWith:'[*] '},
		{separator:'---------------' },
		{name:'Цитата', openWith:'[quote]', closeWith:'[/quote]'},
		{name:'Код', openWith:'[code]', closeWith:'[/code]',
		dropMenu :[
			{name:'PHP', openWith:'[pre class=php]', closeWith:'[/pre]' },
			{name:'JavaScript', openWith:'[pre class=j-script]', closeWith:'[/pre]' },
			{name:'CSS', openWith:'[pre class=css]', closeWith:'[/pre]' },
                        {name:'SQL', openWith:'[pre class=sql]', closeWith:'[/pre]' },
                        {name:'Text', openWith:'[pre class=plain]', closeWith:'[/pre]' }
		]},
		{separator:'---------------' },
		{name:'Отчистить от тегов', className:"clean", replaceWith:function(markitup) { return markitup.selection.replace(/\[(.*?)\]/g, "") } },
		{name:'Предпросмотр', className:"preview", call:'preview' }

	]
}
