-/* Import plugin specific language pack */\r
-tinyMCE.importPluginLanguagePack('wordpress', '');\r
-\r
-function TinyMCE_wordpress_initInstance(inst) {\r
- if (!tinyMCE.settings['wordpress_skip_plugin_css'])\r
- tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/wordpress/wordpress.css");\r
-}\r
-\r
-function TinyMCE_wordpress_getControlHTML(control_name) {\r
- switch (control_name) {\r
- case "wordpress":\r
- var titleMore = tinyMCE.getLang('lang_wordpress_more_button');\r
- var titlePage = tinyMCE.getLang('lang_wordpress_page_button');\r
- var titleHelp = tinyMCE.getLang('lang_wordpress_help_button');\r
- var buttons = '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\')" target="_self" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpressmore\');return false;"><img id="{$editor_id}_wordpress_more" src="{$pluginurl}/images/more.gif" title="'+titleMore+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';\r
- // Add this to the buttons var to put the Page button into the toolbar.\r
- // '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\')" target="_self" onclick="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mcewordpresspage\');return false;"><img id="{$editor_id}_wordpress_page" src="{$pluginurl}/images/page.gif" title="'+titlePage+'" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';\r
- return buttons;\r
- }\r
-\r
- return '';\r
-}\r
-\r
-function TinyMCE_wordpress_parseAttributes(attribute_string) {\r
- var attributeName = "";\r
- var attributeValue = "";\r
- var withInName;\r
- var withInValue;\r
- var attributes = new Array();\r
- var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');\r
- var titleText = tinyMCE.getLang('lang_wordpress_more');\r
- var titleTextPage = tinyMCE.getLang('lang_wordpress_page');\r
-\r
- if (attribute_string == null || attribute_string.length < 2)\r
- return null;\r
-\r
- withInName = withInValue = false;\r
-\r
- for (var i=0; i<attribute_string.length; i++) {\r
- var chr = attribute_string.charAt(i);\r
-\r
- if ((chr == '"' || chr == "'") && !withInValue)\r
- withInValue = true;\r
- else if ((chr == '"' || chr == "'") && withInValue) {\r
- withInValue = false;\r
-\r
- var pos = attributeName.lastIndexOf(' ');\r
- if (pos != -1)\r
- attributeName = attributeName.substring(pos+1);\r
-\r
- attributes[attributeName.toLowerCase()] = attributeValue.substring(1).toLowerCase();\r
-\r
- attributeName = "";\r
- attributeValue = "";\r
- } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)\r
- withInName = true;\r
-\r
- if (chr == '=' && withInName)\r
- withInName = false;\r
-\r
- if (withInName)\r
- attributeName += chr;\r
-\r
- if (withInValue)\r
- attributeValue += chr;\r
- }\r
-\r
- return attributes;\r
-}\r
-\r
-function TinyMCE_wordpress_execCommand(editor_id, element, command, user_interface, value) {\r
- var inst = tinyMCE.getInstanceById(editor_id);\r
- var focusElm = inst.getFocusElement();\r
- var doc = inst.getDoc();\r
-\r
- function getAttrib(elm, name) {\r
- return elm.getAttribute(name) ? elm.getAttribute(name) : "";\r
- }\r
-\r
- // Handle commands\r
- switch (command) {\r
- case "mcewordpressmore":\r
- var flag = "";\r
- var template = new Array();\r
- var altMore = tinyMCE.getLang('lang_wordpress_more_alt');\r
-\r
- // Is selection a image\r
- if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {\r
- flag = getAttrib(focusElm, 'class');\r
- \r
- if (flag != 'mce_plugin_wordpress_more') // Not a wordpress\r
- return true;\r
- \r
- action = "update";\r
- }\r
- \r
- html = ''\r
- + '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '\r
- + ' width="100%" height="10px" '\r
- + 'alt="'+altMore+'" title="'+altMore+'" class="mce_plugin_wordpress_more" name="mce_plugin_wordpress_more" />';\r
- tinyMCE.execCommand("mceInsertContent",true,html);\r
- tinyMCE.selectedInstance.repaint();\r
- return true;\r
- case "mcewordpresspage":\r
- var flag = "";\r
- var template = new Array();\r
- var altPage = tinyMCE.getLang('lang_wordpress_more_alt');\r
- \r
- // Is selection a image\r
- if (focusElm != null && focusElm.nodeName.toLowerCase() == "img") {\r
- flag = getAttrib(focusElm, 'name');\r
- \r
- if (flag != 'mce_plugin_wordpress_page') // Not a wordpress\r
- return true;\r
- \r
- action = "update";\r
- }\r
- \r
- html = ''\r
- + '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" '\r
- + ' width="100%" height="10px" '\r
- + 'alt="'+altPage+'" title="'+altPage+'" class="mce_plugin_wordpress_page" name="mce_plugin_wordpress_page" />';\r
- tinyMCE.execCommand("mceInsertContent",true,html);\r
- tinyMCE.selectedInstance.repaint();\r
- return true;\r
- }\r
-\r
- // Pass to next handler in chain\r
- return false;\r
-}\r
-\r
-function TinyMCE_wordpress_cleanup(type, content) {\r
- switch (type) {\r
- \r
- case "insert_to_editor":\r
- var startPos = 0;\r
- var altMore = tinyMCE.getLang('lang_wordpress_more_alt');\r
- var altPage = tinyMCE.getLang('lang_wordpress_page_alt');\r
-\r
- // Parse all <!--more--> tags and replace them with images\r
- while ((startPos = content.indexOf('<!--more-->', startPos)) != -1) {\r
- // Insert image\r
- var contentAfter = content.substring(startPos + 11);\r
- content = content.substring(0, startPos);\r
- content += '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" ';\r
- content += ' width="100%" height="10px" ';\r
- content += 'alt="'+altMore+'" title="'+altMore+'" class="mce_plugin_wordpress_more" />';\r
- content += contentAfter;\r
-\r
- startPos++;\r
- }\r
- var startPos = 0;\r
-\r
- // Parse all <!--page--> tags and replace them with images\r
- while ((startPos = content.indexOf('<!--nextpage-->', startPos)) != -1) {\r
- // Insert image\r
- var contentAfter = content.substring(startPos + 15);\r
- content = content.substring(0, startPos);\r
- content += '<img src="' + (tinyMCE.getParam("theme_href") + "/images/spacer.gif") + '" ';\r
- content += ' width="100%" height="10px" ';\r
- content += 'alt="'+altPage+'" title="'+altPage+'" class="mce_plugin_wordpress_page" />';\r
- content += contentAfter;\r
-\r
- startPos++;\r
- }\r
-\r
- // It's supposed to be WYSIWYG, right?\r
- content = content.replace(new RegExp('&', 'g'), '&');\r
-\r
- break;\r
-\r
- case "get_from_editor":\r
- // Parse all img tags and replace them with <!--more-->\r
- var startPos = -1;\r
- while ((startPos = content.indexOf('<img', startPos+1)) != -1) {\r
- var endPos = content.indexOf('/>', startPos);\r
- var attribs = TinyMCE_wordpress_parseAttributes(content.substring(startPos + 4, endPos));\r
-\r
- if (attribs['class'] == "mce_plugin_wordpress_more") {\r
- endPos += 2;\r
- \r
- var embedHTML = '<!--more-->';\r
- \r
- // Insert embed/object chunk\r
- chunkBefore = content.substring(0, startPos);\r
- chunkAfter = content.substring(endPos);\r
- content = chunkBefore + embedHTML + chunkAfter;\r
- }\r
- if (attribs['class'] == "mce_plugin_wordpress_page") {\r
- endPos += 2;\r
- \r
- var embedHTML = '<!--nextpage-->';\r
- \r
- // Insert embed/object chunk\r
- chunkBefore = content.substring(0, startPos);\r
- chunkAfter = content.substring(endPos);\r
- content = chunkBefore + embedHTML + chunkAfter;\r
- }\r
- }\r
-\r
- // If it says & in the WYSIWYG editor, it should say & in the html.\r
- content = content.replace(new RegExp('&', 'g'), '&');\r
- content = content.replace(new RegExp('&nbsp;', 'g'), ' ');\r
-\r
- // Remove anonymous, empty paragraphs.\r
- content = content.replace(new RegExp('<p>(\\s| )*</p>', 'mg'), '');\r
-\r
- // Handle table badness.\r
- content = content.replace(new RegExp('<(table( [^>]*)?)>.*?<((tr|thead)( [^>]*)?)>', 'mg'), '<$1><$3>');\r
- content = content.replace(new RegExp('<(tr|thead|tfoot)>.*?<((td|th)( [^>]*)?)>', 'mg'), '<$1><$2>');\r
- content = content.replace(new RegExp('</(td|th)>.*?<(td( [^>]*)?|th( [^>]*)?|/tr|/thead|/tfoot)>', 'mg'), '</$1><$2>');\r
- content = content.replace(new RegExp('</tr>.*?<(tr|/table)>', 'mg'), '</tr><$1>');\r
- content = content.replace(new RegExp('<(/?(table|tbody|tr|th|td)[^>]*)>(\\s*|(<br ?/?>)*)*', 'g'), '<$1>');\r
-\r
- // Pretty it up for the source editor.\r
- var blocklist = 'blockquote|ul|ol|li|table|thead|tr|th|td|div|h\\d|pre|p';\r
- content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');\r
- content = content.replace(new RegExp('\\s*<(('+blocklist+')[^>]*)>\\s*', 'mg'), '\n<$1>');\r
- content = content.replace(new RegExp('<((li|/?tr|/?thead|/?tfoot)( [^>]*)?)>', 'g'), '\t<$1>');\r
- content = content.replace(new RegExp('<((td|th)( [^>]*)?)>', 'g'), '\t\t<$1>');\r
- content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'mg'), '<br />\n');\r
- content = content.replace(new RegExp('^\\s*', ''), '');\r
- content = content.replace(new RegExp('\\s*$', ''), '');\r
- \r
- break;\r
- }\r
-\r
- // Pass through to next handler in chain\r
- return content;\r
-}\r
-\r
-function TinyMCE_wordpress_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {\r
- function getAttrib(elm, name) {\r
- return elm.getAttribute(name) ? elm.getAttribute(name) : "";\r
- }\r
-\r
- tinyMCE.switchClassSticky(editor_id + '_wordpress_more', 'mceButtonNormal');\r
- tinyMCE.switchClassSticky(editor_id + '_wordpress_page', 'mceButtonNormal');\r
-\r
- if (node == null)\r
- return;\r
-\r
- do {\r
- if (node.nodeName.toLowerCase() == "img" && getAttrib(node, 'class').indexOf('mce_plugin_wordpress_more') == 0)\r
- tinyMCE.switchClassSticky(editor_id + '_wordpress_more', 'mceButtonSelected');\r
- if (node.nodeName.toLowerCase() == "img" && getAttrib(node, 'class').indexOf('mce_plugin_wordpress_page') == 0)\r
- tinyMCE.switchClassSticky(editor_id + '_wordpress_page', 'mceButtonSelected');\r
- } while ((node = node.parentNode));\r
-\r
- return true;\r
-}\r
-\r
-function wp_save_callback(el, content, body) {\r
- // We have a TON of cleanup to do.\r
-\r
- // Mark </p> if it has any attributes.\r
- content = content.replace(new RegExp('(<p[^>]+>.*?)</p>', 'mg'), '$1</p#>');\r
-\r
- // Decode the ampersands of time.\r
- content = content.replace(new RegExp('&', 'g'), '&');\r
-\r
- // Get it ready for wpautop.\r
- content = content.replace(new RegExp('[\\s]*<p>[\\s]*', 'mgi'), '');\r
- content = content.replace(new RegExp('[\\s]*</p>[\\s]*', 'mgi'), '\n\n');\r
- content = content.replace(new RegExp('\\n\\s*\\n\\s*\\n*', 'mgi'), '\n\n');\r
- content = content.replace(new RegExp('\\s*<br ?/?>\\s*', 'gi'), '\n');\r
-\r
- // Fix some block element newline issues\r
- var blocklist = 'blockquote|ul|ol|li|table|thead|tr|th|td|div|h\\d|pre';\r
- content = content.replace(new RegExp('\\s*<(('+blocklist+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');\r
- content = content.replace(new RegExp('\\s*</('+blocklist+')>\\s*', 'mg'), '</$1>\n');\r
- content = content.replace(new RegExp('<li>', 'g'), '\t<li>');\r
-\r
- // Unmark special paragraph closing tags\r
- content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');\r
- content = content.replace(new RegExp('\\s*(<p[^>]+>.*</p>)', 'mg'), '\n$1');\r
-\r
- // Trim any whitespace\r
- content = content.replace(new RegExp('^\\s*', ''), '');\r
- content = content.replace(new RegExp('\\s*$', ''), '');\r
-\r
- // Hope.\r
- return content;\r
-\r
-}\r
+(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{mceTout:0,init:function(c,d){var e=this,h=c.getParam("wordpress_adv_toolbar","toolbar2"),g=0,f,b;f='<img src="'+d+'/img/trans.gif" class="mceWPmore mceItemNoResize" title="'+c.getLang("wordpress.wp_more_alt")+'" />';b='<img src="'+d+'/img/trans.gif" class="mceWPnextpage mceItemNoResize" title="'+c.getLang("wordpress.wp_page_alt")+'" />';if(getUserSetting("hidetb","0")=="1"){c.settings.wordpress_adv_hidden=0}c.onPostRender.add(function(){var i=c.controlManager.get(h);if(c.getParam("wordpress_adv_hidden",1)&&i){a.hide(i.id);e._resizeIframe(c,h,28)}});c.addCommand("WP_More",function(){c.execCommand("mceInsertContent",0,f)});c.addCommand("WP_Page",function(){c.execCommand("mceInsertContent",0,b)});c.addCommand("WP_Help",function(){c.windowManager.open({url:tinymce.baseURL+"/wp-mce-help.php",width:450,height:420,inline:1})});c.addCommand("WP_Adv",function(){var i=c.controlManager,j=i.get(h).id;if("undefined"==j){return}if(a.isHidden(j)){i.setActive("wp_adv",1);a.show(j);e._resizeIframe(c,h,-28);c.settings.wordpress_adv_hidden=0;setUserSetting("hidetb","1")}else{i.setActive("wp_adv",0);a.hide(j);e._resizeIframe(c,h,28);c.settings.wordpress_adv_hidden=1;setUserSetting("hidetb","0")}});c.addCommand("WP_Medialib",function(){var j=c.getParam("wp_fullscreen_editor_id")||c.getParam("fullscreen_editor_id")||c.id,i=tinymce.DOM.select("#wp-"+j+"-media-buttons a.thickbox");if(i&&i[0]){i=i[0]}else{return}tb_show("",i.href);tinymce.DOM.setStyle(["TB_overlay","TB_window","TB_load"],"z-index","999999")});c.addButton("wp_more",{title:"wordpress.wp_more_desc",cmd:"WP_More"});c.addButton("wp_page",{title:"wordpress.wp_page_desc",image:d+"/img/page.gif",cmd:"WP_Page"});c.addButton("wp_help",{title:"wordpress.wp_help_desc",cmd:"WP_Help"});c.addButton("wp_adv",{title:"wordpress.wp_adv_desc",cmd:"WP_Adv"});c.addButton("add_media",{title:"wordpress.add_media",image:d+"/img/image.gif",cmd:"WP_Medialib"});c.onBeforeExecCommand.add(function(p,m,s,l,j){var v=tinymce.DOM,k,i,r,u,t,q;if("mceFullScreen"==m){if("mce_fullscreen"!=p.id&&v.select("a.thickbox").length){p.settings.theme_advanced_buttons1+=",|,add_media"}}if("JustifyLeft"==m||"JustifyRight"==m||"JustifyCenter"==m){k=p.selection.getNode();if(k.nodeName=="IMG"){q=m.substr(7).toLowerCase();t="align"+q;i=p.dom.getParent(k,"dl.wp-caption");r=p.dom.getParent(k,"div.mceTemp");if(i&&r){u=p.dom.hasClass(i,t)?"alignnone":t;i.className=i.className.replace(/align[^ '"]+\s?/g,"");p.dom.addClass(i,u);if(u=="aligncenter"){p.dom.addClass(r,"mceIEcenter")}else{p.dom.removeClass(r,"mceIEcenter")}j.terminate=true;p.execCommand("mceRepaint")}else{if(p.dom.hasClass(k,t)){p.dom.addClass(k,"alignnone")}else{p.dom.removeClass(k,"alignnone")}}}}});c.onInit.add(function(i){i.onNodeChange.add(function(k,j,m){var l;if(m.nodeName=="IMG"){l=k.dom.getParent(m,"dl.wp-caption")}else{if(m.nodeName=="DIV"&&k.dom.hasClass(m,"mceTemp")){l=m.firstChild;if(!k.dom.hasClass(l,"wp-caption")){l=false}}}if(l){if(k.dom.hasClass(l,"alignleft")){j.setActive("justifyleft",1)}else{if(k.dom.hasClass(l,"alignright")){j.setActive("justifyright",1)}else{if(k.dom.hasClass(l,"aligncenter")){j.setActive("justifycenter",1)}}}}});if(i.id!="wp_mce_fullscreen"&&i.id!="mce_fullscreen"){i.dom.addClass(i.getBody(),"wp-editor")}else{if(i.id=="mce_fullscreen"){i.dom.addClass(i.getBody(),"mce-fullscreen")}}i.onBeforeSetContent.add(function(j,k){if(k.content){k.content=k.content.replace(/<p>\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi,"<$1$2>");k.content=k.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi,"</$1>")}})});if("undefined"!=typeof(jQuery)){c.onKeyUp.add(function(j,l){var i=l.keyCode||l.charCode;if(i==g){return}if(13==i||8==g||46==g){jQuery(document).triggerHandler("wpcountwords",[j.getContent({format:"raw"})])}g=i})}c.onSaveContent.addToTop(function(i,j){j.content=j.content.replace(/<p>(<br ?\/?>|\u00a0|\uFEFF)?<\/p>/g,"<p> </p>")});c.onSaveContent.add(function(i,j){if(i.getParam("wpautop",true)&&typeof(switchEditors)=="object"){if(i.isHidden()){j.content=j.element.value}else{j.content=switchEditors.pre_wpautop(j.content)}}});e._handleMoreBreak(c,d);c.addShortcut("alt+shift+c",c.getLang("justifycenter_desc"),"JustifyCenter");c.addShortcut("alt+shift+r",c.getLang("justifyright_desc"),"JustifyRight");c.addShortcut("alt+shift+l",c.getLang("justifyleft_desc"),"JustifyLeft");c.addShortcut("alt+shift+j",c.getLang("justifyfull_desc"),"JustifyFull");c.addShortcut("alt+shift+q",c.getLang("blockquote_desc"),"mceBlockQuote");c.addShortcut("alt+shift+u",c.getLang("bullist_desc"),"InsertUnorderedList");c.addShortcut("alt+shift+o",c.getLang("numlist_desc"),"InsertOrderedList");c.addShortcut("alt+shift+d",c.getLang("striketrough_desc"),"Strikethrough");c.addShortcut("alt+shift+n",c.getLang("spellchecker.desc"),"mceSpellCheck");c.addShortcut("alt+shift+a",c.getLang("link_desc"),"mceLink");c.addShortcut("alt+shift+s",c.getLang("unlink_desc"),"unlink");c.addShortcut("alt+shift+m",c.getLang("image_desc"),"WP_Medialib");c.addShortcut("alt+shift+g",c.getLang("fullscreen.desc"),"mceFullScreen");c.addShortcut("alt+shift+z",c.getLang("wp_adv_desc"),"WP_Adv");c.addShortcut("alt+shift+h",c.getLang("help_desc"),"WP_Help");c.addShortcut("alt+shift+t",c.getLang("wp_more_desc"),"WP_More");c.addShortcut("alt+shift+p",c.getLang("wp_page_desc"),"WP_Page");c.addShortcut("ctrl+s",c.getLang("save_desc"),function(){if("function"==typeof autosave){autosave()}});if(tinymce.isWebKit){c.addShortcut("alt+shift+b",c.getLang("bold_desc"),"Bold");c.addShortcut("alt+shift+i",c.getLang("italic_desc"),"Italic")}c.onInit.add(function(i){tinymce.dom.Event.add(i.getWin(),"scroll",function(j){i.plugins.wordpress._hideButtons()});tinymce.dom.Event.add(i.getBody(),"dragstart",function(j){i.plugins.wordpress._hideButtons()})});c.onBeforeExecCommand.add(function(i,k,j,l){i.plugins.wordpress._hideButtons()});c.onSaveContent.add(function(i,j){i.plugins.wordpress._hideButtons()});c.onMouseDown.add(function(i,j){if(j.target.nodeName!="IMG"){i.plugins.wordpress._hideButtons()}})},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.0"}},_setEmbed:function(b){return b.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g,function(d,c){return'<img width="300" height="200" src="'+tinymce.baseURL+'/plugins/wordpress/img/trans.gif" class="wp-oembed mceItemNoResize" alt="'+c+'" title="'+c+'" />'})},_getEmbed:function(b){return b.replace(/<img[^>]+>/g,function(c){if(c.indexOf('class="wp-oembed')!=-1){var d=c.match(/alt="([^\"]+)"/);if(d[1]){c="[embed]"+d[1]+"[/embed]"}}return c})},_showButtons:function(f,d){var g=tinyMCE.activeEditor,i,h,b,j=tinymce.DOM,e,c;b=g.dom.getViewPort(g.getWin());i=j.getPos(g.getContentAreaContainer());h=g.dom.getPos(f);e=Math.max(h.x-b.x,0)+i.x;c=Math.max(h.y-b.y,0)+i.y;j.setStyles(d,{top:c+5+"px",left:e+5+"px",display:"block"});if(this.mceTout){clearTimeout(this.mceTout)}this.mceTout=setTimeout(function(){g.plugins.wordpress._hideButtons()},5000)},_hideButtons:function(){if(!this.mceTout){return}if(document.getElementById("wp_editbtns")){tinymce.DOM.hide("wp_editbtns")}if(document.getElementById("wp_gallerybtns")){tinymce.DOM.hide("wp_gallerybtns")}clearTimeout(this.mceTout);this.mceTout=0},_resizeIframe:function(c,e,b){var d=c.getContentAreaContainer().firstChild;a.setStyle(d,"height",d.clientHeight+b);c.theme.deltaHeight+=b},_handleMoreBreak:function(c,d){var e,b;e='<img src="'+d+'/img/trans.gif" alt="$1" class="mceWPmore mceItemNoResize" title="'+c.getLang("wordpress.wp_more_alt")+'" />';b='<img src="'+d+'/img/trans.gif" class="mceWPnextpage mceItemNoResize" title="'+c.getLang("wordpress.wp_page_alt")+'" />';c.onInit.add(function(){c.dom.loadCSS(d+"/css/content.css")});c.onPostRender.add(function(){if(c.theme.onResolveName){c.theme.onResolveName.add(function(f,g){if(g.node.nodeName=="IMG"){if(c.dom.hasClass(g.node,"mceWPmore")){g.name="wpmore"}if(c.dom.hasClass(g.node,"mceWPnextpage")){g.name="wppage"}}})}});c.onBeforeSetContent.add(function(f,g){if(g.content){g.content=g.content.replace(/<!--more(.*?)-->/g,e);g.content=g.content.replace(/<!--nextpage-->/g,b)}});c.onPostProcess.add(function(f,g){if(g.get){g.content=g.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mceWPmore')!==-1){var h,j=(h=i.match(/alt="(.*?)"/))?h[1]:"";i="<!--more"+j+"-->"}if(i.indexOf('class="mceWPnextpage')!==-1){i="<!--nextpage-->"}return i})}});c.onNodeChange.add(function(g,f,h){f.setActive("wp_page",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPnextpage"));f.setActive("wp_more",h.nodeName==="IMG"&&g.dom.hasClass(h,"mceWPmore"))})}});tinymce.PluginManager.add("wordpress",tinymce.plugins.WordPress)})();
\ No newline at end of file