Changeset 41785
- Timestamp:
- 10/06/2017 07:11:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/editor.js
r41783 r41785 102 102 var keepSelection = false; 103 103 if ( editor ) { 104 keepSelection = editor.getParam( 'wp_keep_scroll_position' ) 104 keepSelection = editor.getParam( 'wp_keep_scroll_position' ); 105 105 } else { 106 106 keepSelection = window.tinyMCEPreInit.mceInit[ id ] && 107 window.tinyMCEPreInit.mceInit[ id ] ['wp_keep_scroll_position']107 window.tinyMCEPreInit.mceInit[ id ].wp_keep_scroll_position; 108 108 } 109 109 … … 322 322 */ 323 323 function getShortCodePositionsInText( content ) { 324 var allShortcodes = getShortcodesInText( content ) ;324 var allShortcodes = getShortcodesInText( content ), shortcodeInfo; 325 325 326 326 if ( allShortcodes.length === 0 ) { … … 349 349 * we can treat it as text and use the selection markers in it. 350 350 */ 351 var isPreviewable = ! showAsPlainText && isShortcodePreviewable( shortcodeMatch[2] ), 352 shortcodeInfo = { 353 shortcodeName: shortcodeMatch[2], 354 showAsPlainText: showAsPlainText, 355 startIndex: shortcodeMatch.index, 356 endIndex: shortcodeMatch.index + shortcodeMatch[0].length, 357 length: shortcodeMatch[0].length, 358 isPreviewable: isPreviewable 359 }; 351 var isPreviewable = ! showAsPlainText && isShortcodePreviewable( shortcodeMatch[2] ); 352 353 shortcodeInfo = { 354 shortcodeName: shortcodeMatch[2], 355 showAsPlainText: showAsPlainText, 356 startIndex: shortcodeMatch.index, 357 endIndex: shortcodeMatch.index + shortcodeMatch[0].length, 358 length: shortcodeMatch[0].length, 359 isPreviewable: isPreviewable 360 }; 360 361 361 362 shortcodesDetails.push( shortcodeInfo );
Note: See TracChangeset
for help on using the changeset viewer.