aboutsummaryrefslogtreecommitdiff
path: root/data/stuff/tinymce-4.3.7/plugins/example
diff options
context:
space:
mode:
Diffstat (limited to 'data/stuff/tinymce-4.3.7/plugins/example')
-rw-r--r--data/stuff/tinymce-4.3.7/plugins/example/dialog.html8
-rw-r--r--data/stuff/tinymce-4.3.7/plugins/example/plugin.min.js1
2 files changed, 9 insertions, 0 deletions
diff --git a/data/stuff/tinymce-4.3.7/plugins/example/dialog.html b/data/stuff/tinymce-4.3.7/plugins/example/dialog.html
new file mode 100644
index 0000000..565f06f
--- /dev/null
+++ b/data/stuff/tinymce-4.3.7/plugins/example/dialog.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+<body>
+ <h3>Custom dialog</h3>
+ Input some text: <input id="content">
+ <button onclick="top.tinymce.activeEditor.windowManager.getWindows()[0].close();">Close window</button>
+</body>
+</html> \ No newline at end of file
diff --git a/data/stuff/tinymce-4.3.7/plugins/example/plugin.min.js b/data/stuff/tinymce-4.3.7/plugins/example/plugin.min.js
new file mode 100644
index 0000000..88687c7
--- /dev/null
+++ b/data/stuff/tinymce-4.3.7/plugins/example/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("example",function(a,b){a.addButton("example",{text:"My button",icon:!1,onclick:function(){a.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(b){a.insertContent("Title: "+b.data.title)}})}}),a.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){a.windowManager.open({title:"TinyMCE site",url:b+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var b=a.windowManager.getWindows()[0];a.insertContent(b.getContentWindow().document.getElementById("content").value),b.close()}},{text:"Close",onclick:"close"}]})}})}); \ No newline at end of file