SID-01696: text under headings lose colour
Status: |
Answered |
TWiki version: |
5.1.4 |
Perl version: |
5.10.1 |
Category: |
WysiwygPlugin |
Server OS: |
Ubuntu 10.10 |
Last update: |
10 years ago |
Via the wysiwyg editor, text with colour that is placed under a heading will lose its colour.
If this text is pasted into a page (any page) under the markup view, it will display the colour properly:
---+ Test
%BLUE%
* Machine's name:
* May be moved to another server in the winter term
* Server's name:
* Server1
* Server2
%ENDCOLOR%
However, as soon as this markup is analysed by the WYSIWYG editor, it places a blank line under the heading. When the blank line exists, the colour of the paragraphs does not apply.
For example, after the above code was pasted into the markup editor and then saved, it displayed properly. I then pressed Edit again, at which point it opened in the default WYSIWYG editor. Without making any changes I pressed Save and the colour was gone. The markup was changed to the following:
---+ Test
%BLUE%
* Machine's name:
* May be moved to another server in the winter term
* Server's name:
* Server1
* Server2
%ENDCOLOR%
(note the extra line between 'Test' and BLUE)
The only workaround we have at present is to not use the WYSIWYG editor.
--
Daniel Allen - 2013-05-06
Discussion and Answer
The BLUE variable is a span element, meaning it can only be used within a paragraph, bullet or table cell. It cannot be used for multiple elements. You need to define the color in a div element. such as:
* Set BLUEDIV = <div style="color: #0000ff">
* Set ENDDIV = </div>
Test:
- Machine's name:
- May be moved to another server in the winter term
- Server's name:
--
Peter Thoeny - 2013-05-06
Thanks; works. (for those who come along afterward: we had to wrap the ENDDIV in a verbatim tag, otherwise it broke the preferences page.)
--
Daniel Allen - 2013-05-07
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.