[wp-trac] [WordPress Trac] #32160: WYSIWYG editor deletes span without class or id
WordPress Trac
noreply at wordpress.org
Thu Jul 16 02:18:01 UTC 2015
#32160: WYSIWYG editor deletes span without class or id
--------------------------+-------------------------
Reporter: Nikschavan | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: TinyMCE | Version:
Severity: normal | Resolution: invalid
Keywords: close | Focuses: javascript
--------------------------+-------------------------
Changes (by jeremyfelt):
* status: new => closed
* version: trunk =>
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Thanks for taking the time to open a ticket, @Nikschavan.
Replying to [comment:2 Nikschavan]:
> Is there not any other solution other than directly skipping this spans?
As it is valid markup, shouldn't this be allowed?
It would be nice if it could be, though in order to normalize the behavior
of different browsers, TinyMCE has to assume that a `<span>` without an ID
or class has been inserted by the browser without user intent.
There are a couple things you could do to work around the issue in
specific scenarios. Bare span elements could be allowed by filtering the
`extended_valid_elements` setting for TinyMCE. A custom selection could be
provided via TinyMCE plugin in the toolbar for the customer to wrap text
without requiring any HTML entry.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32160#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list