Good morning, Rainer

Thanks! That's a nice start. I'll try to rewrite the simplebrowser plugin in 
the same way.

I suggest to drop the 2.x compatibility. It makes no sense to me to be 
compatible with an oldish in-browser-editor that is not compatible with todays 
modern browsers. 

What do the other devs think about this?

Jürgen


Am 15.10.2010 um 01:14 schrieb Rainer Schöpf:

> Hello Jürgen,
> 
>> I'm currently working on our publication to get it working smoothly with the 
>> 2.1 dev branch.
>> So far so good...
>> 
>> IIUC some of your work at the summer meeting in Bordeaux was about making 
>> lenya compatible with tinymce 3.x.
>> 
>> When the TinyMCE usecase is executed, I get the following JavaScript errors:
>> 
>> tinyMCE.importPluginLanguagePack is not a function
>> tinyMCE.importPluginLanguagePack('simplebrowser', 'en');
>> 
>> tinyMCE.importPluginLanguagePack is not a function
>> tinyMCE.importPluginLanguagePack('unloadhandler');
>> 
>> 
>> These errors (and other followups when the above are fixed) seem to be 
>> related to the Plugin API Changes from TinyMCE 2.x to 3.x (see here: 
>> http://wiki.moxiecode.com/index.php/TinyMCE:Migration_guide). To my 
>> understanding the two lenya tinymce plugins are still written in 2.x plugin 
>> style.
> 
> Correct.
> 
> The unloadhandler plugin code for 3.x is something like
> 
>>>>>>>>>>>>>>>>>>>>>>>> 
>    (function() {
> 
>       tinymce.create('tinymce.plugins.UnloadPlugin', {
> 
>               init : function(ed, url) {
>                   tinymce.DOM.win.onbeforeunload = function() {
>                       var msg = ed.getLang("unloadhandler.unload_msg");
>                       return msg;
>                   }
>               },
> 
>               getInfo : function() {
>                   return {
>                       longname : 'Unload Handler Plugin for Lenya / TinyMCE',
>                           author : 'lenya',
>                           authorurl : 'http://lenya.apache.org',
>                           infourl : 'http://lenya.apache.org',
>                           version : tinyMCE.majorVersion + "." + 
> tinyMCE.minorVersion
>                           };
>               }
> 
>           });
>       
>       tinymce.PluginManager.add("unloadhandler", 
> tinymce.plugins.UnloadPlugin);
>       tinymce.PluginManager.requireLangPack('unloadhandler');
>    })();
> <<<<<<<<<<<<<<<<<<<<<<<<
> 
> (plus the necessary changes to the language files)
> 
> 
> However, the question is:  should the plugins work with both 2.x and 3.x, or 
> can 
> the 2.x version be dropped?
> 
> In the first case, one can write something like
> 
> if (tinyMCE.importPluginLanguagePack) { # check for existence of 2.x function
> 
> (2.x style code)
> 
> } else {
> 
> (3.x style code)
> 
> }
> 
> Rainer
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@lenya.apache.org
> For additional commands, e-mail: user-h...@lenya.apache.org

null-oder-eins GmbH Zürich
web & graphic design

www.null-oder-eins.ch

ragal...@apache.org
Skype: callto://ragaller




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@lenya.apache.org
For additional commands, e-mail: user-h...@lenya.apache.org

Reply via email to