Created
March 23, 2015 12:20
-
-
Save andik/5e8d01efe27b58f7b452 to your computer and use it in GitHub Desktop.
tinymce file browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tinymce.init({ | |
file_browser_callback: function(field_name, url, type, win) { | |
tinymce.activeEditor.windowManager.open({ | |
title: "My file browser", | |
url: "myfilebrowser.html", | |
width: 800, | |
height: 600 | |
}, { | |
oninsert: function(url) { | |
win.document.getElementById(field_name).value = url; | |
} | |
}); | |
} | |
}); | |
// Then in your myfilebrowser.html file call: | |
top.tinymce.activeEditor.windowManager.getParams().oninsert("someurl.html"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment