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.


git-svn-id: https://develop.svn.wordpress.org/trunk@35216 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ella Iseulde Van Dorpe 2015-10-16 05:42:22 +00:00
parent b9c1a56e38
commit 093b6b5d11
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,7 @@
// Add the processed piece for the match.
pieces.push( {
content: '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
content: instance.ignore ? text : '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>',
processed: true
} );
@ -816,6 +816,7 @@
} )
.fail( function( response ) {
if ( self.url ) {
self.ignore = true;
self.removeMarkers();
} else {
self.setError( response.message || response.statusText, 'admin-media' );