Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item2183: Unable to center text with Wysiwyg editor

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension WysiwygPlugin Main.KennethLavrsen
With the WysiwygPlugin and TinyMCE editor, there is no way to center text, and the <center> tag is removed by the editor

Noted issue when using the SlideShowPlugin. Centering of text in title slides, etc. was lost after save.


It appears that the TML2HTML code accepts the "CENTER" tag as valid for TinyMCE. If I comment out the CENTER tag, then the tags are preserved, but I don't think that this is the correct solution.

-- GeorgeClark - 30 Sep 2009

  • <center> is deprecated, so it is correct to remove it from the list of acceptable tags. That fix has been committed.

  • <div align="center" ... The Wysiwyg plugin by default protects the div tag if the "align" attribute is present. however align= is also deprecated and the TinyMCE editor appears to discard the entire div when it is present. Currently not yet fixed. Protecting the syntax with STICKYBITS doesn't resolve the issue.

  • <div style=text-align:center ... is supported by the TinyMCE editor, so a change to the STICKYBITS field to protect div=align,style resolves the issue with this syntax. That change is being tested.

  • I have Unit tests for the three centering syntaxes,

Changes for the two <div> statements and the unit tests are committed to trunk, but not to release. This needs testing to make sure it doesn't interfere with anything else in Wysiwyg.


Committed to Release branch. Changing to waiting for release.
Topic revision: r13 - 29 Nov 2009, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License