Make WordPress Core

Changeset 35216


Ignore:
Timestamp:
10/16/2015 05:42:22 AM (9 years ago)
Author:
iseulde
Message:

TinyMCE: make sure markers are removed after first init

This is only relevant to non embeddable URLs.
After first init, markers were set but not removed,
causing an edited URL to revert when switching to text mode
or any paragraph after the URL to just contain that URL.

Fixes #33954.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/mce-view.js

    r33484 r35216  
    121121                        // Add the processed piece for the match.
    122122                        pieces.push( {
    123                             content: '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
     123                            content: instance.ignore ? text : '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
    124124                            processed: true
    125125                        } );
     
    817817            .fail( function( response ) {
    818818                if ( self.url ) {
     819                    self.ignore = true;
    819820                    self.removeMarkers();
    820821                } else {
Note: See TracChangeset for help on using the changeset viewer.