Opened 2 years ago

Last modified 21 months ago

#13895 confirmed New Feature

Add a hook to allow use of a javascript image/upload and file browser

Reported by: hmoore71 Owned by:
Priority: Normal Milestone:
Component: File Browser Version: 4.0
Keywords: Cc:

Description (last modified by Jakub Ś)

this is what I did to plugins/filebrowse/plugin.js

function browseServer() {             
     //mappro modification
     if (typeof editor.mappro === 'object'){
          var q = new BrowseImagesDialog(editor.mappro.options.args, editor, params.CKEditorFuncNum);
     }else{
         // TODO: V4: Remove backward compatibility (#8163).
         editor.popup(url, ..........
     }
}

 var editor = $('.desc').ckeditor().editor;
 editor.mappro = mappro;

I will be using this in my Wordpress plugin IBS Mappro. I am also working on an upload too.

I would like the hook integrated more robustly though;

     if(typeof editor.userHookBrowser === 'object'){

     new editor.userHookBrowser.dialog(editor.userHookBowser.options, params.CKEditorFuncNum)

Change History (3)

comment:1 Changed 21 months ago by Jakub Ś

Description: modified (diff)

comment:2 Changed 21 months ago by Jakub Ś

Description: modified (diff)

comment:3 Changed 21 months ago by Piotrek Koszuliński

Status: newconfirmed
Version: 4.5.44.0

I think that the right way to add a hook would be to fire some event (and adding the current behaviour as its default listener).

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy