The module is all ready to allow the use of different libraries files. (wysiwyg.module -> function wysiwyg_load_editor($profile) )
There is only the lack of an UI option to select from the different libraries files.
That would allow to select different options for the library files as for debugging or performance. For example, in ckeditor, jwysiwyg, markitup, tinymce, wymeditor or yui, you could select the use of a src, packed, minimized versions as are defined in the editor's .inc file.
I was working on #276465: Add support for TinyMCE gzip compressor to allow using a compressed version of the TinyMCE editor. And this feature is needed in order to select the right exec mode
Comment | File | Size | Author |
---|---|---|---|
#10 | wysiwyg-exec_mode_ui-862100-10.patch | 1.73 KB | rv0 |
#1 | wysiwyg_exec_mode_ui_2.patch | 1.74 KB | jcmarco |
wysiwyg_exec_mode_ui.patch | 1.95 KB | jcmarco |
Comments
Comment #1
jcmarco CreditAttribution: jcmarco commentedHorrible mistake with the patch.
The buttons and plugins fieldset was lost.
Comment #2
jcmarco CreditAttribution: jcmarco commentedWrong patch format
Comment #3
jcmarco CreditAttribution: jcmarco commentedThis version shows only exec modes which first defined file exists.
It would be needed to reorder existing editors library settings to put first the most characteristic files for that specific Exec Mode.
Comment #4
jcmarco CreditAttribution: jcmarco commentedReorder YUI Editor settings in order to have as first file the most characteristic one for each mode.
This way you can select the execution mode for any editor, showing only the modes with the right files installed.
Comment #5
protools CreditAttribution: protools commentedi use #4 for Wysiwyg 7.2.1 with tinyMCE and i can choose Execution Mode: only from minified and source.
How i can get gziped support ?
I am Copy the tiny_mce_gzip.js and tiny_mce_gzip.php to the /sites/all/libraries/tinymce/jscripts but nothing change: i can choose Execution Mode: only from minified and source.
Comment #6
TwoDThis change broke YUI Editor for me, as the YAHOO global is not defined yet. (The script order here is also the execution order.)
Made some minor string changes, otherwise the same patch re-rolled for D7. Should still apply to D6 as well.
This setting should really be stored globally/per-library, so Wysiwyg does not attempt to load two or more variants of the same library. Haven't found a solution to that yet.
EDIT: If anyone else wants to try the gzipped version of TinyMCE, like @protools, you also need to apply the patch in #276465: Add support for TinyMCE gzip compressor after this one.
Comment #7
protools CreditAttribution: protools commentedthanks for your quick help
from #6 work perfect for drupal 7
Comment #8
protools CreditAttribution: protools commentedComment #9
rv0 CreditAttribution: rv0 commentedJust confirming that this patch seems to work along nicely with the current version.
Thanks!
Comment #10
rv0 CreditAttribution: rv0 commentedA re-roll of #6 against latest dev
Comment #11
TwoDThanks!
How about maybe base this patch on top of #2274177: Allow altering settings per editor and field? (That may need a re-roll too by now...)
That issue introduces a 3-stage mechanism for handling editor settings: globally per editor, per format/profile, and finally per field - where the current GUI is the format/profile stage.
Since selecting a library variant or "execMode" to use should really only be done once per editor (only the first of two profiles with conflicting settings can be enforced), I think it would fit nicely into the "global" settings stage.
That patch does not include a GUI for editing global or per-field settings (alter hooks are there), nor does it implement a storage mechanism for them either, and we'd need both to make this possible. The current profile page and
{wysiwyg}
table manages per format/profile data and I think we need other pages and tables for global settings.I'm a bit worried that if we don't do this users may end up creating multiple profiles with different variants to load, and either just be confused or end up with "broken" editors because of loading two variants of the same lib twice.
Side note:
Implementing a GUI (and a storage modal) for per field settings seems like a major task at this point, but selecting the library to load that late is an extreme edge case I'm just going to ignore, so that's not relevant here...