data-mce-src="-" for mind map

This commit is contained in:
life
2017-01-23 22:54:45 +08:00
parent 414a562563
commit eb193ebd1f
8 changed files with 8 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ tinymce.PluginManager.add('leaui_mindmap', function(editor, url) {
km.exportData('png').then(function(data) {
var json = JSON.stringify(km.exportJson());
// console.log(json);
var img = '<img src="' + data + '" data-mind-json=\'' + json + '\'>';
var img = '<img src="' + data + '" data-mce-src="-" data-mind-json=\'' + json + '\'>';
editor.insertContent(img);
me.parent().parent().close();

View File

@@ -1 +1 @@
var LEAUI_MIND={};tinymce.PluginManager.add("leaui_mindmap",function(a,b){function c(){function c(){var c=a.settings.language,d=b+"/mindmap/index.html?i=1",e='<iframe id="leauiMindMapIfr" src="'+d+"?"+(new Date).getTime()+"&lang="+c+'" frameborder="0"></iframe>';return e}var d=a.dom,e=a.selection.getContent(),f=/<img.*?\/>/g,g=e.match(f),h=document.createElement("p");LEAUI_MIND={};for(var i in g){h.innerHTML=g[i];var j=h.firstChild;if(j&&"IMG"==j.nodeName){LEAUI_MIND.json=d.getAttrib(j,"data-mind-json");break}}var k=window.innerWidth-10,l=window.innerHeight-150;win=a.windowManager.open({title:"Mind Map",width:k,height:l,html:c(),buttons:[{text:"Cancel",onclick:function(){this.parent().parent().close()}},{text:"Insert",subtype:"primary",onclick:function(b){var c=this,d=document.getElementById("leauiMindMapIfr").contentWindow,e=d.km;e.exportData("png").then(function(b){var d=JSON.stringify(e.exportJson()),f='<img src="'+b+"\" data-mind-json='"+d+"'>";a.insertContent(f),c.parent().parent().close()})}}]})}a.addButton("leaui_mindmap",{icon:"mind",tooltip:"Insert/edit mind map",onclick:c,stateSelector:"img[data-mind-json]"})});
var LEAUI_MIND={};tinymce.PluginManager.add("leaui_mindmap",function(a,b){function c(){function c(){var c=a.settings.language,d=b+"/mindmap/index.html?i=1",e='<iframe id="leauiMindMapIfr" src="'+d+"?"+(new Date).getTime()+"&lang="+c+'" frameborder="0"></iframe>';return e}var d=a.dom,e=a.selection.getContent(),f=/<img.*?\/>/g,g=e.match(f),h=document.createElement("p");LEAUI_MIND={};for(var i in g){h.innerHTML=g[i];var j=h.firstChild;if(j&&"IMG"==j.nodeName){LEAUI_MIND.json=d.getAttrib(j,"data-mind-json");break}}var k=window.innerWidth-10,l=window.innerHeight-150;win=a.windowManager.open({title:"Mind Map",width:k,height:l,html:c(),buttons:[{text:"Cancel",onclick:function(){this.parent().parent().close()}},{text:"Insert",subtype:"primary",onclick:function(b){var c=this,d=document.getElementById("leauiMindMapIfr").contentWindow,e=d.km;e.exportData("png").then(function(b){var d=JSON.stringify(e.exportJson()),f='<img src="'+b+'" data-mce-src="-" data-mind-json=\''+d+"'>";a.insertContent(f),c.parent().parent().close()})}}]})}a.addButton("leaui_mindmap",{icon:"mind",tooltip:"Insert/edit mind map",onclick:c,stateSelector:"img[data-mind-json]"})});

View File

@@ -114,4 +114,4 @@
writeScripts();
})(this);
// $hash: 7f014edd21d9dadc674b3ee20ce581a2
// $hash: 071cc762958091231ac7b4b6e595d233

View File

@@ -115,4 +115,4 @@
writeScripts();
})(this);
// $hash: 2a940e42d1d5586ee4cb1c4edfddd911
// $hash: c26fa9d61be8ccbed156c7c2cfccf5f4

View File

@@ -220,4 +220,4 @@
writeScripts();
})(this);
// $hash: 5298883a2388fa3b9e124259f4f9b892
// $hash: 4acaf8215fd0f7fb67ae082bd4d86098

View File

@@ -39885,7 +39885,7 @@ tinymce.PluginManager.add('leaui_mindmap', function(editor, url) {
km.exportData('png').then(function(data) {
var json = JSON.stringify(km.exportJson());
// console.log(json);
var img = '<img src="' + data + '" data-mind-json=\'' + json + '\'>';
var img = '<img src="' + data + '" data-mce-src="-" data-mind-json=\'' + json + '\'>';
editor.insertContent(img);
me.parent().parent().close();

File diff suppressed because one or more lines are too long

View File

@@ -220,4 +220,4 @@
writeScripts();
})(this);
// $hash: ded07386598c5a9d19e059af0deb9ca5
// $hash: 23a2a36eca6bd99e13e6a8ba1a4bee73