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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcmarco’s picture

Horrible mistake with the patch.
The buttons and plugins fieldset was lost.

jcmarco’s picture

Wrong patch format

jcmarco’s picture

This 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.

jcmarco’s picture

Reorder 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.

protools’s picture

i 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.

TwoD’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work
FileSize
1.99 KB
+++ editors/yui.incundefined
@@ -19,25 +19,25 @@ function wysiwyg_yui_editor() {
+          'editor/editor-min.js',
           'yahoo-dom-event/yahoo-dom-event.js',
           'animation/animation-min.js',
           'element/element-min.js',
           'container/container-min.js',
           'menu/menu-min.js',
           'button/button-min.js',
-          'editor/editor-min.js',
         ),
       ),
       'src' => array(
         'title' => 'Source',
         'files' => array(
+          'editor/editor.js',
           'yahoo-dom-event/yahoo-dom-event.js',
           'animation/animation.js',
           'element/element.js',
           'container/container.js',
           'menu/menu.js',
           'button/button.js',
-          'editor/editor.js',

This 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.

protools’s picture

thanks for your quick help

from #6 work perfect for drupal 7

protools’s picture

Status: Needs work » Needs review
rv0’s picture

Just confirming that this patch seems to work along nicely with the current version.
Thanks!

rv0’s picture

Issue summary: View changes
FileSize
1.73 KB

A re-roll of #6 against latest dev

TwoD’s picture

Thanks!

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...