Item2183: Unable to center text with Wysiwyg editor

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: patch
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: GeorgeClark
Waiting For: Main.KennethLavrsen
Last Change By: 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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy