This commit is contained in:
life committed 2014-05-07 13:06:24 +08:00
1 parent fac05a7b6c
commit 476ade10e7
1085 files changed
+259628

No files matched your search

@@ -0,0 +1,33 @@
/**
* 图片上传插件
* 结合了原tinymce image插件
* 添加了input上传和拖拽上传
* http://leanote.com
*/
tinymce.PluginManager.add('leanote_image', function(editor, url) {
// 弹框
function showDialog() {
/*
win = editor.windowManager.open({
title: 'Insert/edit image',
file : url + '/dialog.html',
width : 550,
height: 345
});
*/
showDialog2("#imageDialog", {postShow:function() {
$("#imageDialog iframe").attr("src", url + '/dialog.html');
}});
}
// 添加按钮
editor.addButton('leanote_image', {
icon: 'image',
tooltip: 'ctrl+shift+i 插入/修改图片',
onclick: showDialog,
stateSelector: 'img:not([data-mce-object])'
});
editor.addShortcut('ctrl+shift+i', '', showDialog);
});