+/* global tinymce */
/**
* WordPress View plugin.
*/
selected;
tinymce.create('tinymce.plugins.wpView', {
- init : function( editor, url ) {
+ init : function( editor ) {
var wpView = this;
// Check if the `wp.mce` API exists.
// When the editor's content has been updated and the DOM has been
// processed, render the views in the document.
- editor.onSetContent.add( function( editor, o ) {
+ editor.onSetContent.add( function( editor ) {
wp.mce.view.render( editor.getDoc() );
});
// When a view is selected, ensure content that is being pasted
// or inserted is added to a text node (instead of the view).
- editor.selection.onBeforeSetContent.add( function( selection, o ) {
+ editor.selection.onBeforeSetContent.add( function( selection ) {
var view = wpView.getParentView( selection.getNode() ),
walker, target;
// Triggers when the selection is changed.
// Add the event handler to the top of the stack.
- editor.onNodeChange.addToTop( function( editor, controlManager, node, collapsed, o ) {
+ editor.onNodeChange.addToTop( function( editor, controlManager, node ) {
var view = wpView.getParentView( node );
// Update the selected view.