19 include_once($ROOT_PATH.
'wysiwyg_plugin.inc');
41 var $keyword_tag =
'';
52 var $keywords = Array();
62 $this->_add_button(
'addsnippetkeyword',
'',
'',
'',
'');
63 $this->_add_button(
'snippethelp',
'snippethelp',
'Snippet Keyword Information',
'true',
'0');
77 this.config.snippetkeywords = Array(
80 foreach ($this->keywords as $keyword => $name) {
81 $keyword = str_replace(Array(
'"',
"\r",
"\n"), Array(
'\"',
'\r',
'\n'), $keyword);
83 $name = ucwords(str_replace(
'_',
' ', $keyword));
85 $name = str_replace(Array(
'"',
"\r",
"\n"), Array(
'\"',
'\r',
'\n'), $name);
88 $string .=
"\n".
'Array("'.$this->keyword_tag.$keyword.$this->keyword_tag.
'", "'.$name.
'"),';
90 echo trim($string,
', ');
107 case "addsnippetkeyword":
109 options[
"-- select snippet keyword --"] =
"";
110 for (var i in editor.config.snippetkeywords) {
111 var keyword = editor.config.snippetkeywords[i];
112 options[keyword[1]] = keyword[0];
130 case "addsnippetkeyword":
132 this.insertHTML(value);
133 el.selectedIndex = 0;
152 strPage =
"<?php echo $this->get_popup_href('snippet_info_popup.php'); ?>";
153 this._popupDialog(
"snippetInfo", strPage, 790, 500,
true,
function() {}, 0);