[wp-trac] [WordPress Trac] #26975: TinyMCE adding inline line-height styles and spans

WordPress Trac noreply at wordpress.org
Thu Apr 3 17:41:02 UTC 2014


#26975: TinyMCE adding inline line-height styles and spans
--------------------------+------------------------------
 Reporter:  lumpysimon    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  3.8.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by azaozz):

 The bad news is WebKit and particularly Chrome is getting more and more
 aggressive in inserting these unwanted styles with each new version. Seen
 reports that even gamil is affected.

 The good news is that in TinyMCE 4.0 the paste plugin filters content even
 when pasting from one place in the editor to another, or dragging selected
 text. Only font-style, font-weight and color are retained (this is
 configurable from the `tiny_mce_before_init` filter).

 Been looking at making another content filter based off the presence of
 `line-height`. Not just to remove that but filter the rest of the inline
 styles allowing only a small subset that may have been added by the user.
 Something like the filtering in the paste plugin but would process the
 entire content on saving.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26975#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list