/**
* upfile 1.1v
* The tinymce-plugins is used to upfile
*
* https://github.com/Five-great/tinymce-plugins
*
* Copyright 2020, Five(Li Hailong) The Chengdu, China https://www.fivecc.cn/
*
* Licensed under MIT
*/
tinymce.PluginManager.add('upfile', function(editor, url) {
var pluginName='上传文件';
window.upfile={}; //扔外部公共变量,也可以扔一个自定义的位置
window.upfile.file_callback = editor.getParam('file_callback', undefined, 'function');
window.upfile.tinymce = tinymce;
window.upfile.res={};
var openDialog = function() {
return editor.windowManager.open({
title: pluginName,
body: {
type: 'panel', // The root body type - a Panel or TabPanel
items: [ // A list of panel components
{
type: 'iframe', // component type
name: 'upfile_iframe', // identifier
label: ' ', // text for the iframe's title attribute
sandboxed: true,
}
]
},
initialData: {
upfile_iframe: `