// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags
// ----------------------------------------------------------------------------
mySettings = {	
	onShiftEnter:  	{keepDefault:true, replaceWith:'<br>'},
	onCtrlEnter:  	{keepDefault:false, openWith:'<p>', closeWith:'</p>'},
	onTab:    		{keepDefault:false, replaceWith:'    '},
	markupSet:  [ 	
		{name:'Жирный', key:'B', openWith:'(!(<b>|!|<strong>)!)', closeWith:'(!(</b>|!|</strong>)!)' },
		{name:'Наклонный', key:'I', openWith:'(!(<i>|!|<em>)!)', closeWith:'(!(</i>|!|</em>)!)'  },
		{name:'Подчеркнуть', key:'U', openWith:'<u>', closeWith:'</u>' },
		{separator:'---------------' },
		{name:'Зачеркнуть', key:'S', openWith:'<del>', closeWith:'</del>' },
		{name:'Подстрочник', key:'M', openWith:'<sub>', closeWith:'</sub>' },
		{name:'Надстрочник', key:'N', openWith:'<sup>', closeWith:'</sup>' },
		{separator:'---------------' },
		{name:'Заголовок', key:'H', openWith:'<h1>', closeWith:'</h1>' },
		{name:'Список', key:'O', openWith:'<ul>\n<li>', closeWith:'</li>\n</ul>' },
		{separator:'---------------' },
		{name:'Выровнять влево', key:'F', openWith:'<div align="left">', closeWith:'</div>' },
		{name:'Выровнять по центру', key:'G', openWith:'<div align="center">', closeWith:'</div>' },
		{name:'Выровнять вправо', key:'R', openWith:'<div align="right">', closeWith:'</div>' },
		{name:'Выровнять по ширине', key:'J', openWith:'<div align="justify">', closeWith:'</div>' },
		{separator:'---------------' },
		{name:'Загрузка картинки(файла). Закрыть окно загрузки - Alt-клик', key:'D',  call:'uploadsInsula' },
		{name:'Ссылка простая', key:'L', openWith:'<a href="" title="">', closeWith:'</a>', placeHolder:'Текст для ссылки' },
		{name:'Ссылка в новом окне', key:'Q', openWith:'<a href="" title="" target="_blank">', closeWith:'</a>', placeHolder:'Текст для ссылки' },
		{name:'Ссылка для E-mail', key:'E', openWith:'<a href="mailto:" title="">', closeWith:'</a>', placeHolder:'e-mail' },
		{separator:'---------------' },
		{name:'Расставить переносы', className:'rbr', replaceWith:function(markitup) { var ret=markitup.selection.replace(/\r/g, ''); ret=ret.replace(/<br>/g, ''); return ret.replace(/\n/g, '<br>\n') } },
		{name:'Очистить', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },		
		{name:'Превью. Закрыть превью - Alt-клик', className:'preview',  call:'preview'}			
	]
}
