Changeset 36605
- Timestamp:
- 02/20/2016 10:13:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r36602 r36605 75 75 76 76 function getSelectedLink() { 77 var href, html 78 node = editor.selection.getNode() ;77 var href, html, 78 node = editor.selection.getNode(), 79 79 link = editor.dom.getParent( node, 'a[href]' ); 80 80 … … 98 98 return link; 99 99 } 100 100 101 101 function removePlaceholders() { 102 102 editor.$( 'a' ).each( function( i, element ) { … … 110 110 }); 111 111 } 112 112 113 113 function removePlaceholderStrings( content, dataAttr ) { 114 114 if ( dataAttr ) { … … 237 237 } 238 238 } ); 239 239 240 240 // Remove any remaining placeholders on saving. 241 241 editor.on( 'savecontent', function( event ) { 242 242 event.content = removePlaceholderStrings( event.content, true ); 243 243 }); 244 244 245 245 // Prevent adding undo levels on inserting link placeholder. 246 246 editor.on( 'BeforeAddUndo', function( event ) {
Note: See TracChangeset
for help on using the changeset viewer.