I have duplicated a setup that has worked, but it is not working now.
I have a set of css classes that appear in the Font styles dropdown menu.
They work when I apply a class to a <p> or other block-type element .
But when I select some text and choose a class from the dropdown instead of getting
<span class="abc">text</span>
I get
<span style="font-family: __;">text</span>
(When I had "Convert <font> tags to styles" unchecked I got <font face="__">text</font>)
Other cleanup settings:
√ Verify HTML
Preformatted
√ Convert <font> tags to styles
√ Remove linebreaks
Apply source formatting
√ Force cleanup on standard paste
The them is zeropoint.
I presume I have some setting wrong, but cannot work out what it might be.
Can anyone suggest where to look.
Cheers
Miriam
Comments
Comment #1
twodWhen you talk about the generated source, do you mean in the "View source" mode of the editor (or when the editor is disabled using the link below it), or in the rendered node/comment? If the latter, it may be one of your input filters messing with things.
Which browser(s) has this been tested/reproduced in?
Does the same thing happen if you leave all checkboxes under "Buttons and Plugins" unchecked so the editor is returned to its (near) default configuration?
Can you reproduce it on http://tinymce.moxiecode.com/examples/full.php?
Comment #2
belong@mywebworkshop.com commentedI am editing a node; I have wysiwyg editor showing; I apply a style to some text within a line; I use link below text area to inspect html --> no span inserted. I either get (exactly)
depending on whether "Convert
<font>tags to styles" is checked or not.If I don't inspect the html, but simply save the node, there is nothing there. If I reopen the file the smae font face or font-family items are there. THe input filte does not allow these tags, so presume Drupal removed them to dsplay the page.
Same result in Safari and Firefox (Mac).
The input format allows span but not font.
I disabled all check boxes except the Font style box.
Test 1:
I typed in a sentence in richtext mode. I selected the word test, applied the leader style. I selected the word leader and applied the leader style. I saved the node, then edited the node again, switch to disable richtext, and here is the code:
Test 2:
I typed in the sentence in richtext. I selected the word test, applied the leader style. This time I disabled richtext, there was a font tag around the word leader, as above. I switched back to richtext and selected the second word, "leader" and applied the leader style, then disabled richtext and this is what I got:
The first instance is now correct, and the second instance is wrong.
Test 3:
Back into richtext mode, type a another sentence after the first, select a third word and apply the leader style, and got this:
The first instance is still correct, the second instance has now turned into a proper span, and the 3rd instance is incorrect, showing font-family.
Test 4:
turn the other buttons back on. Type in an addittonal paragraph and repeat the process. Result:
The faulty instance in para1 has now corrected, the first instance in para 2 was wrong on first view, but came right when a second instance in the same paragraph was done. The final instance is still wrong.
Any suggestions?
Comment #3
twodDid you post HTML tags in the comment above? If so, please use <code> </code> wrappers around it so the system won't filter them out.
You're right about Drupal filtering out tags which have not been explicitly allowed by the "HTML Filter"-filter. It will however always filter out
style="..."attributes even in allowed tags, for security reasons. I can recommend using WYSIWYG Filter instead and configure it so that style tags (and more specifically, which CSS properties) are to be left intact.Btw, what you see when disabling rich text editing is what will be submitted to Drupal's database, that will also be what the input filters have to work with during rendering. Wysiwyg module doesn't run any code during rendering of a node, comment or anything else.
Comment #4
sunI've fixed the markup in comment #2
Comment #5
sunSorry, without further information this issue can only be closed as not reproducible.
Feel free to re-open this issue if you want to provide further information. Thanks.