Giter VIP home page Giter VIP logo

Comments (6)

claudep avatar claudep commented on June 14, 2024

Mmhh... no possible attachments :-/ Here we go:

diff --git a/scripts/filemanager.js b/scripts/filemanager.js
index 5eca86d..e2e214b 100755
--- a/scripts/filemanager.js
+++ b/scripts/filemanager.js
@@ -168,6 +168,21 @@ $.urlParam = function(name){
 // NOTE: closes the window when finished.
 var selectItem = function(data){
        if(window.opener){
+               if(window.tinyMCEPopup){
+                       // use TinyMCE > 3.0 integration method
+                       var win = tinyMCEPopup.getWindowArg("window");

+                       
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = data['Path'];

+                       if (typeof(win.ImageDialog) != "undefined") {

+                               // Update image dimensions

+                               if (win.ImageDialog.getImageData)

+                                       win.ImageDialog.getImageData();

+                               // Preview if necessary

+                               if (win.ImageDialog.showPreviewImage)

+                                       win.ImageDialog.showPreviewImage(data['Path']);

+                       }

+                       tinyMCEPopup.close();

+                       return;

+               }

                if($.urlParam('CKEditor')){

                        // use CKEditor 3.0 integration method


window.opener.CKEDITOR.tools.callFunction($.urlParam('CKEditorFuncNum'), data['Path'])

from filemanager.

simogeo avatar simogeo commented on June 14, 2024

Hi claudep,

Thanks a lot for that patch, i'll try to integrate it to the trunk soon!

from filemanager.

simogeo avatar simogeo commented on June 14, 2024

Hi claudep,

The job is done. Could you give a try?
Thank again.

from filemanager.

simogeo avatar simogeo commented on June 14, 2024

Could you precise how to integrate the filemanager and which vars have to be set into tinymce config file? So I can update the readme for TinyMCE integration (as it is done for others RTE).

By the way, if you prefer you could also fork the project and pull your changes!

from filemanager.

claudep avatar claudep commented on June 14, 2024

Here's the commit on my fork branch:
http://github.com/claudep/Filemanager/commit/d1ce2f2edf98d23b4006a4c93bdbbffe79b2890b

from filemanager.

simogeo avatar simogeo commented on June 14, 2024

thanks.
Next time, you can directly ask for a pull clicking the button up right
See the following guide : http://help.github.com/pull-requests/

from filemanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.