Support Forum
I recently added the Editor TinyMCE Rich Text plugin for use on Forum posts, and it has messed up the TinyMCE functions in the normal blog posts Visual Editor.....it has completely changed the behavior of several Visual Tab style buttons, for example, my 'i' button for italics stopped using the standard (and my preferred) "em" tags, instead it wraps text in "span" a tag with the font styled as italics......this is screwing with my carefully constructed CSS.
I'm sure it's the plugin, I did extensive testing - deactivating the plugin returns my Visual Editor behavior back to normal, reactivating it screws it up again.
I really need my forum posters to be able to use a WYSIWYG style bar, several moderators have complained that it's difficult for them to link to on-site content, and I don't want to have to spend time training them all on using (manually added) HTML nor to continually clean up their mistakes - BUT I also need the Visual Editor for my Posts to work correctly too!
How can I fix this issue?
I'm fine with hacking the plugin if given directions (and then not updating it until this is fixed), but using a span tag is the wrong way to go - even if it used the still-acceptable in HTML5 "i" tag instead of "em" that would be fine.
Any ideas?
By 'Visual Editor' I assume you are referring to the default blog post editor which is, in fact, TinyMCE. It is exactly the same version that the forum uses because we utilise the WP code to run the editor. I am also assuming you mean the display of the posts on the website as opposed to using the editor to write the posts.
My first reaction is one of suspicion because we are extremely careful to not load any of the 'front-end' forum code to the admin. We certainly do not load any editor components as there is no requirement within the forum to do so.
On the other hand we are also extremely careful not to load any of our CSS on non-forum pages on the front end. But in any case, TinyMCE itself adds no CSS to the front-end.
Also - of course - we do not change the html being output by the editor. It uses exactly the same code for processing output as the WordPress blog post editor because, quite simply, it IS the same editor..!
So - having said all that - let me run some tests on a development site and talk to my colleague @mr-papa to see if we can think of anything that might be wrong.
YELLOW
SWORDFISH
|
Well - I have found the where of the problem - but not found out the why! It makes little sense as the piece of code having the effect should not be loaded and I can find - as yet - no evidence that it IS being loaded. But clearly, in some way I can not yet explain, it is.
I can also not explain why the code is there. So we have some work to do here to decipher this.
I can give you the fix and it is pretty simple. You need to make a small edit to the main plugin file of our tinyMCE plugin. So, by default, you need the file:
/wp-content/sp-resources/forum-plugins/tinymce-richtext/sp-tinymce-plugin.php
at line 63 - at the bottom of a list of 'add-filter' calls you will fnd the filter starting:
add_filter('tiny_mce_before_init'
simply comment that line out - put a # symbol at the front of the line and save. That should do the trick. Just in case you do not know - please ensure to use a plain text editor or tools in your hosting control panel for editing.
And we will start the process of trying to work out what is going on. Apologies for this. But I do like a good detective story!
YELLOW
SWORDFISH
|
@yellow-swordfish- Like you, I do love a good mystery to solve! 🙂
Many thanks for looking into this problem.......I've been offline all day (traveling) but I will try your suggested fix over the weekend and report back.....I'm totally fine with hacking the plugin as a temporary measure, or even a permanent one, depending on how your sleuthing turns out. 🙂
Thanks!
EDIT: Well I had a few minutes so I commented out the line you suggested, and all is well - my Visual Editor for regular posts is now back to using the EM tag instead of a styled SPAN, and my forum has the WYSIWYG editor back......it matters not at all to me if the forum posts use a span tag for italics, as long as my blog posts use em, since that's the tag I have styled specifically in my CSS.
MANY thanks again! 🙂
this has been like that for some time so a bit surprised just popping up now! 😉
our sp themes specifically style em and italic identically so wouldnt matter... most wp themes do as well, but of course could do differently...
either way, we shouldnt be affecting blog post content so will get it fixed up in next version... thanks for the heads up!
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)