Sha256: 861747f2cf7d46141490010b5c500abaf15a499e27e199beb2b18fb135f43937
Contents?: true
Size: 969 Bytes
Versions: 23
Compression:
Stored size: 969 Bytes
Contents
tinymce.PluginManager.add('filemanager', function(editor) { function openmanager() { var dom = editor.dom; $.fn.upload_elfinder({ selected: function(res){ var file = _.first(res) var linkAttrs = { href: file.url.to_url(), target: '_blank', rel: null, "class": null, title: file.name } editor.insertContent(dom.createHTML('a', linkAttrs, dom.encode(file.name))); } }); } editor.addButton('filemanager', { icon: 'browse', tooltip: 'Insert file', onclick: openmanager, stateSelector: 'img:not([data-mce-object])' }); editor.addMenuItem('filemanager', { icon: 'browse', text: 'Insert file', onclick: openmanager, context: 'insert', prependToContext: true }) });
Version data entries
23 entries across 23 versions & 1 rubygems