HTML editor now uses RGB color for font color; hexadecimal format broken

HTML editor now uses RGB color for font color; hexadecimal format broken

by A. T. Wyatt -
Number of replies: 3
I hope someone can set me straight here.

I have observed that the 1.5.3 html editor sets font color as a style with rgb values.  Is this a new development?  I ask because I have a couple of courses that were created on 1.5 and upgraded through 1.5.2+ with font colors applied.  When we upgraded to 1.5.3 over the Christmas break, suddenly the font colors were all rendered as black.  After some digging, we realized that the old html code for font color was still embedded, but apparently is no longer rendered.

The only way I knew to correct the problem was to delete all the <font color="#000000"> type tags and re-apply the color which yields <span style="font-weight: bold; color: rgb(0, 204, 0); font-style: italic;"> type tags.  This is very time consuming.

I have also observed that the color-picker reports the font color as hexadecimal.

So here are my questions:
1) Has the html editor changed the way it applies color from 1.5.2 to 1.5.3?
2) Is there some way to get it to recognize and render the old font color tags? (because if people copy and paste code from a standard html editor into the Moodle editor window, they are likely to use this type of tag)
3) Has it always been this way and I am just crazy? 

Thanks for any information on this problem.

atw
Average of ratings: -
In reply to A. T. Wyatt

Re: HTML editor now uses RGB color for font color; hexadecimal format broken

by Sharon Goodson -

Hi A.T.! I realize your post is nearly three years old, but I just found myself with a similar problem - though there are some interesting differences...(seems if there's weird stuff, I'll find it  thoughtful).

We migrated to a new production site (running Moodle 1.9.3+ Build: 20081210) last month, and just left the old site up as a sandbox site (upgraded to Moodle 1.9.3+ Build: 20081210). 

I noticed today that some (if not all) of the HTML resources created before the migration where not displaying text color on the new site, but where still displaying color correctly on the old site was.

I finally figured out - in part - why this was. When editing the resources in HTML editor, the HTML code on the sandbox site (where all the material originated)  shows table, border and font colors as hexadecimal. Everything appears correctly in edit and view mode. No problems.

When editing the resources  on the new site, however,  the HTML code for table and borders colors has mysteriously changed to RGB, but font colors are still written as hexadecimal.  Everything displays correctly in edit mode, but in view mode, tables and boarders display color correctly, but all text is rendered black.

I have the same questions as you, except for #1, I would ask:

a): If a migration could somehow make this change (I know I didn't change it - and it wasn't an upgrade - unless the problem resurfaced from 1.5.2 in the 1.9.3 12/10/2008 build, and was corrected again corrected in the 1.9.3 12/31/2008 build, which I doubt).

b): HOW could this change occur?

I know the migration did cause the appearance of some odd characters within text, and some empty <//span> tags (yes, with two backslashes) that may have had to do with ms character set translations that occurred during the migration. But any color applied to resources (text or otherwise) was done directly in the Moodle HTML editor.

Did you every find an easier way to address this, and does anybody have a possible explanation?

Thanks!

sg

In reply to Sharon Goodson

Re: HTML editor now uses RGB color for font color; hexadecimal format broken

by Sharon Goodson -
self reply *lol*

After two trying days i turns out the problem was the Tidy filter, which is activated on the Moodle production AND installed on the server. Tidy is activated in admin>filters on the sandbox site too, but it is not installed actually installed on the server.

I'm curious though, why wouldn't it clean it up and convert the html tags properly during a migration, instead of just ignoring them? Especially since Moodle apparently applies old-fashioned font tags when creating text in the editor...

I wish Moodle had a way to warn users that an activated filter was not available on the server, needed attention, or something, like it like it warns when blocks are missing, incompatable or need upgrading. I would have noted the difference in settings within minutes instead of looking everywhere else.

Whew! What a lesson! tongueout


In reply to Sharon Goodson

Re: HTML editor now uses RGB color for font color; hexadecimal format broken

by Hanaa Aboushahla -

Hi Sharon,

I have the same problem.

I tried differing sizes of fonts that appear on the Moodle site. Despite all efforts to create documents with consistent fonts, I've tried at least three different ways around this problem -- the fonts look and read as consistent when editing the page and then when posted they magically do whatever they want. I've given up until I read your posting; there might be a hope again.

I am the site Administrator, I went to check the Tidy filter from admin>Module>Manage filters to find out that it is inactive. I tried clicking on it to activate it, but it still shows that it is in active. I am attaching a screen shot of my site.

You have mentioned that:

>> Tidy is activated in admin>filters on the sandbox site too, but it is not installed actually installed on the server.

How can I know if the Tidy is installed in my server or not? Where shall I go?

Thank you,
Hanaa.