Changing default font tags in visual rich editor
I’m setting up a blog for a client and wanted to amend the default tags entered by the Visual Rich Editor when a user enters or amends copy. At the moment this inserts. For example it may insert something like this:
<p class=”MsoNormal”><font size=”2″ face=”Arial”><span lang=”EN-GB” style=”font-size: 10pt; font-family: Arial”>
Is there somewhere I can stop this form happening so the copy simply is inserted in:
Thanks in advance for any help.
Stop copying from MS Word directly into the VRE. WP or the editor didn’t add those tags. Word did.
If you must compose articles in Word, at least copy and paste them to notepad before the blog to strip that office formatting out.
In WP2.1, hit ALT+V (IE) or ALT+SHIFT+V (Firefox) to toggle the Advanced Toolbar in the visual editor and use the ‘paste as plain text’ or ‘paste from MS Word’ buttons to clean up text from Word.
I’ve just removed line 45 of
I don’t advise this and don’t know what the side effects are, but it puts the button for switching the advance controls on and off on the end of the default buttons and so far I’ve had no ill effects.
Also you need to shift+control Refresh in Firefox to see the change.
it’s veru usefull tip’s work well
hide n show button replace the help button
Please be careful when modifying files, I do not know if this hack has any ill effects.
I have a better solution, now I’ve had time to think about it. Do not do what is mentioned above, or undo if it has already been do.
In line 31 of
Move the ‘wp_adv’ to before the ‘wp_adv_start’
Again shift+control Refresh in Firefox to see the change.
If you want all the buttons to show all the time just delete the ‘wp_adv_start’ and ‘wp_adv_end’ on line 31 of the same file.
But please remember on your next upgrade it will return to normal unless you modify the file again after upgrading.
I just upgraded to 2.1. The WYSIWYG editor on my Windows computer on Firefox is fine. The WYSIWYG editor on my Mac running OS 10.4.8 and Firefox has some of the buttons missing: blockquote, bullets, numbering, link, etc. I’m an idiot when it comes to code, so tabbing to the code view doesn’t help. These missing buttons are not the advanced ones that show up with the ‘control+v’ I had a similar problem when I was running WordPress 1.7 on Safari. That’s when a friend suggested I started using Firefox. That seemed to fix that problem.
Thank you for any help you can give.
Joy – just what I was looking for and about to post a query on!!
Why this is not turned on by default I’ll never know, good work guys!
Thanks theApe for the tip.
But when we remove wp_adv_start and wp_adv_end all the buttons are displayed in a single line and it overflows out of the editor window. I tried to change that file a bit more and now it is fixed for me. If you are interested visit my site at http://sudarmuthu.com/blog/2007/02/11/wordpress-21-more-editing-options-in-wysiwyg-editor.html and you can grab the modified file.
I have a different solution, not necessarly better. I did not know of Alt-V option to show the extended toolbar though. It is better to have the “toolbar” icon present for some (who can’t remember to press Alt-V shortcut). I’ve written about it here: http://www.mihavalencic.com/?p=7.
In short, just add wp_adv before the rest of it. So line 57 would look like:
theme_advanced_buttons1 : "wp_adv,<?php echo $mce_buttons; ?>",
- The topic ‘Changing default font tags in visual rich editor’ is closed to new replies.