editor.path="/phpnuke/modules/bueditor/";editor.buttons=[ [ "Вставить изображение", "js:\nvar form = [\n {name: \'src\', title: \'Изображение URL\'},\n {name: \'width\', title: \'Ширина x Высота\', suffix: \' x \', getnext: true, attributes: {size: 3}},\n {name: \'height\', attributes: {size: 3}},\n {name: \'alt\', title: \'Альтернативный текст\'},\n {name: \'align\', title: \'Выравнивание\', type: \'select\', options: {\'\': \'\', left: \'По левому краю\', right: \'По правому краю\', center: \'По центру\'}} //align\n];\neDefTagDialog(\'img\', form,\n\'Вставить изображение\', \'Вставить\');", "image.png", "M" ], [ "Вставить ссылку", "js: eDefFileDialog(\'link\', { \"title\": \"Вставить ссылку\", \"url\": \"Ссылка\", \"tt\": \"Всплывающее пояснение\", \"ok\": \"Вставить\", \"brw\": \"Обзор\" }, \'\');", "link.png", "L" ], [ "Жирный", "\x3cb\x3e%TEXT%\x3c/b\x3e", "i-bold.png", "B" ], [ "Курсив", "\x3cem\x3e%TEXT%\x3c/em\x3e", "i-italic.gif", "I" ], [ "Подчёркнутый", "\x3cu\x3e%TEXT%\x3c/u\x3e", "underline.gif", "" ], [ "Зачёркнутый", "\x3cstrike\x3e%TEXT%\x3c/strike\x3e\n", "strike.gif", "" ], [ "Цитата", "js: \n txt=\'\'\n if (window.getSelection\x26\x26!window.opera) txt = window.getSelection() \n else if (document.getSelection) txt=document.getSelection()\n else if (document.selection) txt=document.selection.createRange().text\nif (txt != \'\') {\n txt=\'[quote]\'+txt+\'[/quote]\'\n editor.active.replaceSelection(txt)\n} else {\n editor.active.tagSelection(\'[quote]\', \'[/quote]\')\n}", "quote.png", "" ], [ "Не нумерованный список", "js: eDefSelProcessLines(\'\x3cul\x3e\\n\', \' \x3cli\x3e\', \'\x3c/li\x3e\', \'\\n\x3c/ul\x3e\');", "i-ul.png", "U" ], [ "Пронумерованный список", "js: eDefSelProcessLines(\'\x3col\x3e\\n\', \' \x3cli\x3e\', \'\x3c/li\x3e\', \'\\n\x3c/ol\x3e\');", "i-ol.png", "O" ], [ "Видео", "[video:%TEXT% width:425 height:344 autoplay:0]", "You_Tube_1.png", "" ], [ "Фрагмент кода", "\x3ccode\x3e%TEXT%\x3c/code\x3e", "code.png", "" ], [ "Смайлики", "js:\n getSmile=function(txt) {\n  editor.active.replaceSelection(txt,\'end\');\n  editor.dialog.close();\n}\nvar userForm = \'\x3ctable\x3e\x3ctr\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':smile:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/smile.gif\" alt=\"smile\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':wink:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/wink.gif\" alt=\"wink\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':sad:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/sad.gif\" alt=\"sad\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':sigh:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/sigh.gif\" alt=\"sigh\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3c/tr\x3e\x3ctr\x3e\';\n\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':angel:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/angel.gif\" alt=\"angel\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':diablo:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/diablo.gif\" alt=\"diablo\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':hmhm:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/hmhm.gif\" alt=\"hmhm\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':embarassed:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/embarassed.gif\" alt=\"embarassed\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3c/tr\x3e\x3ctr\x3e\';\n\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':rose:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/rose.gif\" alt=\"rose\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':laughing:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/laughing.gif\" alt=\"laughing\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':zzz:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/zzz.gif\" alt=\"zzz\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':music:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/music.gif\" alt=\"music\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3c/tr\x3e\x3ctr\x3e\';\n\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':rtfm:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/rtfm.gif\" alt=\"rtfm\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':bl:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/bl.gif\" alt=\"bl\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':shok:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/shok.gif\" alt=\"shok\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':tongue:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/tongue.gif\" alt=\"tongue\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3c/tr\x3e\x3ctr\x3e\';\n\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':puzzled:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/puzzled.gif\" alt=\"puzzled\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':think:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/think.gif\" alt=\"think\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':back:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/back.gif\" alt=\"back\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3ctd\x3e\x3ca href=\"javascript: getSmile(\\\':calm:\\\');\"\x3e\x3cimg src=\"/phpnuke/sites/all/modules/bueditor/icons/smiles/calm.gif\" alt=\"calm\" /\x3e\x3c/a\x3e\x3c/td\x3e\';\nuserForm += \'\x3c/tr\x3e\x3c/table\x3e\';\neditor.dialog.open(\'Смайлики\', userForm);\n", "emotions.gif", "" ], [ "Предпросмотр", "js: \nvar NoAutoP = \'\';\n  var P, E = editor.active, T = E.textArea;\n  if (E.preview) {\n    P = E.preview;\n  }\n  else {\n    P = document.createElement(\'div\');\n    P.className = \'preview\';\n    P.style.display = \'none\';\n    P.style.overflow = \'auto\';\n    T.parentNode.insertBefore(P, T);\n    E.preview = P;\n  }\n  if (P.style.display == \'none\') {\n    var html = NoAutoP ? E.getSelection()||T.value : eDefAutoP(E.getSelection()||T.value);\nhtml=html.replace(/:smile:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/smile.gif\\\" alt=\\\"smile\\\" /\x3e\");\nhtml=html.replace(/:wink:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/wink.gif\\\" alt=\\\"wink\\\" /\x3e\");\nhtml=html.replace(/:sad:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/sad.gif\\\" alt=\\\"sad\\\" /\x3e\");\nhtml=html.replace(/:back:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/back.gif\\\" alt=\\\"back\\\" /\x3e\");\nhtml=html.replace(/:angel:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/angel.gif\\\" alt=\\\"angel\\\" /\x3e\");\nhtml=html.replace(/:diablo:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/diablo.gif\\\" alt=\\\"diablo\\\" /\x3e\");\nhtml=html.replace(/:bl:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/bl.gif\\\" alt=\\\"bl\\\" /\x3e\");\nhtml=html.replace(/:embarassed:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/embarassed.gif\\\" alt=\\\"embarassed\\\" /\x3e\");\nhtml=html.replace(/:calm:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/calm.gif\\\" alt=\\\"calm\\\" /\x3e\");\nhtml=html.replace(/:laughing:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/laughing.gif\\\" alt=\\\"laughing\\\" /\x3e\");\nhtml=html.replace(/:hmhm:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/hmhm.gif\\\" alt=\\\"hmhm\\\" /\x3e\");\nhtml=html.replace(/:music:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/music.gif\\\" alt=\\\"music\\\" /\x3e\");\nhtml=html.replace(/:rtfm:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/rtfm.gif\\\" alt=\\\"rtfm\\\" /\x3e\");\nhtml=html.replace(/:puzzled:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/puzzled.gif\\\" alt=\\\"puzzled\\\" /\x3e\");\nhtml=html.replace(/:shok:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/shok.gif\\\" alt=\\\"shok\\\" /\x3e\");\nhtml=html.replace(/:tongue:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/tongue.gif\\\" alt=\\\"tongue\\\" /\x3e\");\nhtml=html.replace(/:rose:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/rose.gif\\\" alt=\\\"rose\\\" /\x3e\");\nhtml=html.replace(/:sigh:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/sigh.gif\\\" alt=\\\"sigh\\\" /\x3e\");\nhtml=html.replace(/:think:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/think.gif\\\" alt=\\\"think\\\" /\x3e\");\nhtml=html.replace(/:zzz:/g,\"\x3cimg src=\\\"/sites/all/modules/bueditor/icons/smiles/zzz.gif\\\" alt=\\\"zzz\\\" /\x3e\");\n\n    P.style.display = \'block\';\n    P.style.height = T.style.height||(T.offsetHeight+\'px\');\n    P.style.width = T.style.width||(T.offsetWidth+\'px\');\n    P.innerHTML = \'\x3cdiv class=\"node\"\x3e\x3cdiv class=\"content\"\x3e\'+ html +\'\x3c/div\x3e\x3c/div\x3e\';\n    T.style.height = \'1px\';\n    E.buttonsDisabled(true, E.bindex);\n    editor.addClass(E.buttons[E.bindex], \'stay-clicked\');\n  }\n  else {\n    editor.delClass(E.buttons[E.bindex], \'stay-clicked\');\n    E.buttonsDisabled(false);\n    T.style.height = P.style.height;\n    P.style.display = \'none\';\n }", "preview.png", "P" ], [ "Справка", "js: eDefHelp();", "help.png", "H" ] ]
