CoreFiles by mySites.guru
editor_plugin.js1 lines, 1,806 bytes, from wordpress-3.7.38.zip
Raw History Compare with 3.7.37
md5
ca93d7692cb925e491b2041e7f9baa44
sha1
b1bcf2508a4867a767f6f9b0eb6ee89a08245281
sha256
73026fe71c09c17d388623dbeaba8b35e5b458a72b4131f2826bfb1a8ffddac7
!function(){var i,o=tinymce.VK,r=tinymce.dom.TreeWalker;tinymce.create("tinymce.plugins.wpView",{init:function(e,n){var c=this;"undefined"!=typeof wp&&wp.mce&&(e.onPreInit.add(function(e){e.schema.addValidElements("div[*],span[*]")}),e.onBeforeSetContent.add(function(e,n){n.content&&(n.content=wp.mce.view.toViews(n.content))}),e.onSetContent.add(function(e,n){wp.mce.view.render(e.getDoc())}),e.onInit.add(function(o){o.selection.onBeforeSetContent.add(function(e,n){var t,i=c.getParentView(e.getNode());i&&(!i.nextSibling||c.isView(i.nextSibling)?(t=o.getDoc().createTextNode(""),o.dom.insertAfter(t,i)):t=new r(i.nextSibling,i.nextSibling).next(),e.select(t),e.collapse(!0))}),o.selection.onSetContent.add(function(e,n){!n.context||(e=e.getNode()).innerHTML&&(e.innerHTML=wp.mce.view.toViews(e.innerHTML),wp.mce.view.render(e))})}),e.onPostProcess.add(function(e,n){(n.get||n.save)&&n.content&&(n.content=wp.mce.view.toText(n.content))}),e.onNodeChange.addToTop(function(e,n,t,i,o){t=c.getParentView(t);if(t)return c.select(t),!1;c.deselect()}),e.onKeyDown.addToTop(function(e,n){var t=n.keyCode;i&&(c.getParentView(e.selection.getNode())===i?(t!==o.DELETE&&t!==o.BACKSPACE||(e=wp.mce.view.instance(i))&&(e.remove(),c.deselect()),n.metaKey||n.ctrlKey||112<=t&&t<=123||n.preventDefault()):c.deselect())}))},getParentView:function(e){for(;e;){if(this.isView(e))return e;e=e.parentNode}},isView:function(e){return/(?:^|\s)wp-view-wrap(?:\s|$)/.test(e.className)},select:function(e){e!==i&&(this.deselect(),i=e,wp.mce.view.select(i))},deselect:function(){i&&wp.mce.view.deselect(i),i=null},getInfo:function(){return{longname:"WordPress Views",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"1.0"}}}),tinymce.PluginManager.add("wpview",tinymce.plugins.wpView)}();

The same content is in 6 releases, WordPress 3.7.36 to 3.7.41. See them all, or every version of this file.