SID-01442: WysiwygPlugin "non-standard" syntax
| Status: |
Answered |
TWiki version: |
5.1.1 |
Perl version: |
5.01 |
| Category: |
WysiwygPlugin |
Server OS: |
Debian 6.0.4 |
Last update: |
13 years ago |
Hello,
I'm a maths student. 99.9% of my TWiki deals with maths (and its symbols)!
I successfully installed a
TinyMCE plugin, a formula Editor and a Java CAS.
The formula Editor and the Java CAS creates images (stored in a cache) and add this html code to
TinyMCE:
<img class="Editorformula" title="Double click to edit" src="/pub/TWiki/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/tiny_mce_Editorfomula/integration/showimage.php?formula=c3896dfef00bff09d89dbf62f9d3680e.png" alt="3 by 2" align="middle" />
What's the problem?
If I "Save" the topic or click on "Edit TWiki markup" , class="Editorformula" is deleted by
WysiwygPlugin.
I've just learned why: "WysiwygPlugin is incompatible with plugins that expand non-standard syntax".
And maybe the class="" isn't a standard syntax.
class="" has not to be deleted. How can I do?
Please help me; TWiki is like a notebook for me and my friend-colleagues and I don't like to abandon it.
Thank you very much
--
MaurizioAmodei - 2012-03-31
Discussion and Answer
There are issues with the WYSIWYG editor as you discovered
Two options for workaround:
1. Enclose the
<img /> tag in sticky tags, e.g.
<sticky> <img /> </sticky>. The WYSIWYG editor will leave the stuff inside sticky alone.
2. Disable the WYSIWYG editor on a page level, web level or site level with a
Set EDITMETHOD = raw setting.
--
PeterThoeny - 2012-03-31
Hi Peter, I'm honored to speak with the TWiki's Inventor.
1. If I enclose the <img /> tag in sticky tags (in RAW Edit), the image is NO longer visible in tinymce. The image has to be visible with class attribute in its tag.
2. As before, the image has to be visible; Why? Because we would like to see all image-steps of our problems in order to edit them.
What about WYSIWYGPLUGIN_STICKYBITS?
I insert "Set WYSIWYGPLUGIN_STICKYBITS = IMG=class;" in
WebPreferences of my Main Web; but class attributes of img tags in Main Web's topic is still deleted by the editor (Save or Edit Twiki markup).
Thank you very much
--
MaurizioAmodei - 2012-04-01
Not sure why the following does not work:
- Set WYSIWYGPLUGIN_STICKYBITS = IMG=class
Time to debug. More at
TWikiDebugging.
Plugin details at
WysiwygPlugin and
TinyMCEPlugin.
--
PeterThoeny - 2012-04-02
Nothing considerable in error_log:
[] [error] [client ] script not found or unable to stat: /home/*/cgi-bin/twiki, referer:
http://*.com/cgi-bin/twiki/view/TWiki/TWikiScripts
[] [error] [client ]script not found or unable to stat: /home/*/cgi-bin/twiki, referer:
http://*.com/cgi-bin/twiki/view/TWiki/WebIndex
[] [error] [client] script not found or unable to stat: /home/*/cgi-bin/twiki, referer:
http://*.com/cgi-bin/twiki/view/TWiki/TWikiDocumentation/
[] [error] [client] script not found or unable to stat: /home/mathsinvent/cgi-bin/twiki
On
InstalledPlugins NO errors under Plugin Diagnostics.
On
InstalledPlugins under Plugin Diagnostics:
startRenderingHandler:
WysiwygPlugin
This handler is deprecated - please check for updated versions of the plugins that use it!
Why DEPRECATED?
No erros compiling
WysiwygPlugin plugin module from the command line on the server:
@:~/public_html$ perl -Ilib -e 'use TWiki; use TWiki::Plugins::WysiwygPlugin;'
@:~/public_html$
--
MaurizioAmodei - 2012-04-02
I forgot to say that it's the same for
TinyMCEPlugin (no errors).
Thanks
--
MaurizioAmodei - 2012-04-02
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2012-07-01
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.