Fix JSHint errors in the wpview and wplink editor plugins.
props seanchayes. fixes #26024, #26027. Built from https://develop.svn.wordpress.org/trunk@26201 git-svn-id: http://core.svn.wordpress.org/trunk@26109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6292b4c519
commit
69fc43dcb6
|
@ -1,3 +1,5 @@
|
|||
/* global tinymce */
|
||||
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.wpLink', {
|
||||
/**
|
||||
|
@ -18,7 +20,7 @@
|
|||
ed.windowManager.open({
|
||||
id : 'wp-link',
|
||||
width : 480,
|
||||
height : "auto",
|
||||
height : 'auto',
|
||||
wpDialog : true,
|
||||
title : ed.getLang('advlink.link_desc')
|
||||
}, {
|
||||
|
@ -48,7 +50,7 @@
|
|||
author : 'WordPress',
|
||||
authorurl : 'http://wordpress.org',
|
||||
infourl : '',
|
||||
version : "1.0"
|
||||
version : '1.0'
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* global tinymce */
|
||||
/**
|
||||
* WordPress View plugin.
|
||||
*/
|
||||
|
@ -8,7 +9,7 @@
|
|||
selected;
|
||||
|
||||
tinymce.create('tinymce.plugins.wpView', {
|
||||
init : function( editor, url ) {
|
||||
init : function( editor ) {
|
||||
var wpView = this;
|
||||
|
||||
// Check if the `wp.mce` API exists.
|
||||
|
@ -33,7 +34,7 @@
|
|||
|
||||
// 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() );
|
||||
});
|
||||
|
||||
|
@ -41,7 +42,7 @@
|
|||
|
||||
// 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;
|
||||
|
||||
|
@ -95,7 +96,7 @@
|
|||
|
||||
// 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.
|
||||
|
|
Loading…
Reference in New Issue