Opened 19 years ago
Closed 18 years ago
#1607 closed defect (bug) (duplicate)
TinyMCE aligning code invalid (XHTML 1.0 Strict/1.1)
Reported by: | jonthejester | Owned by: | rob1n |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.1.3 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
When a person tries to align a block of text in the TinyMCE rich content textarea, TinyMCE gives the text an html attribute of 'align="..."'--for example:
<p align="center">Block of text.</p>
While this is valid in XHTML 1.0 Transitional, this isn't for 1.0 Strict or 1.1. Ideally it should be an inline style, like, say:
<p style="text-align: center;">Block of text.</p>
I tried setting the inline_styles parameter to "true" in wp-admin/tinymce/tiny_mce_src.js, but unfortunately that hasn't changed the current behavior. Any help here?
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Well, in answer to my own problem, I forgot to add "style" to, and remove "align" from, p[...] and div[...] under "valid_elements" in TinyMCE.prototype.init . I have the file attached now with those fixes, as well as setting inline_styles to "true".
There might be other invalid attributes to snip, I don't know, but that's beyond the scope of this ticket. Just please get these fixes in soon. :)