Ticket #19389: 19389-2.patch
File 19389-2.patch, 944 bytes (added by , 11 years ago) |
---|
-
wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
102 102 ed.wpGetImgCaption = function(content) { 103 103 return t._get_shcode(content); 104 104 }; 105 106 // When inserting content, if the caret is inside a caption create new paragraph under 107 // and move the caret there 108 ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { 109 var node, p; 110 111 if ( cmd == 'mceInsertContent' ) { 112 node = ed.dom.getParent(ed.selection.getNode(), 'div.mceTemp'); 113 114 if ( !node ) 115 return; 116 117 p = ed.dom.create('p'); 118 ed.dom.insertAfter( p, node ); 119 ed.selection.setCursorLocation(p, 0); 120 } 121 }); 105 122 }, 106 123 107 124 _do_shcode : function(content) {