Topic Closed
juergen
1.5K Posts
53.7K Downloads
16 Plugins
design, web development & visual effects

Josh,

any chance to get a CKEditor instance running in an AdminBox called from a plugin's editor?

Like this:

What script components do I need to load in InlineEdit_Scripts() to be able to instantiate a working
CKEditor (with current config) on the textarea, like ...

$gp.AdminBoxC(myBoxHtml); 
CKEDITOR.replace("myBoxHtmlTextares",gp_ckconfig);

Is it possible? - I'm struggling :-(

4 years ago#8421

Josh S.
2K Posts
280K Downloads
16 Themes
18 Plugins

Take a look at InlineEdit_Text() in /include/tool/ajax.php. You probably won't want inlineck.js, but you might want the rest of it.

4 years ago#8426

juergen
1.5K Posts
53.7K Downloads
16 Plugins
design, web development & visual effects

Thanks,
but I simply can't get it running when other addons added CKE plugins using the CKEditorPlugins and CKEditorConfig hooks.

echo 'var gp_ckconfig = '.gp_edit::CKConfig( $options, 'json', $plugins ).';';

... should do the trick, I guess but something's going wrong.

CKE dies with a [CKEDITOR.resourceManager.load] error saying:
Resource name "video" was not found at "http://www.foo.bar/include/thirdparty/ckeditor_34/plugins/video/plugin.js?t=FB9E".

The video plugin is part of MedialementPlayer, found here
"http://www.foo.bar/addons/MediaelementPlayer/CKEditor_plugins/video/plugin.js?t=FB9E"

4 years ago#8429

Josh S.
2K Posts
280K Downloads
16 Themes
18 Plugins

The problem most likely has something to do with  gp_add_plugins. Make sure it's set similarly to how it's set in InlineEdit_Text(). The value should look  something like this:

var gp_add_plugins = {"plugin_name":"\/data\/_ckeditor\/plugin_name\/"};

4 years ago#8430

juergen
1.5K Posts
53.7K Downloads
16 Plugins
design, web development & visual effects

Found it. I had to add this part of inlineck.js to my custom gp_init_inline_edit() frunction. Works now. Thx!

  // add external plugins
  if( typeof(gp_add_plugins) == 'object' ){
    $.each(gp_add_plugins,function(name,path){
      CKEDITOR.plugins.addExternal(name,path);
    });
  }
4 years ago#8439

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register