-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.js
44 lines (38 loc) · 1.07 KB
/
plugin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
tinymce.PluginManager.add('Urdu', function (editor, url, execCommand) {
// Add a button that opens a window
editor.addButton('Urdu', {
text: 'اُردو',
//icon: 'lang',
tooltip: 'Insert Urdu',
onclick: function () {
editor.windowManager.open({
title: 'Write Urdu Here',
url: 'index.html',
width: 700,
height: 600,
});
}
});
// Adds a menu item to the tools menu
editor.addMenuItem('Urdu', {
text: 'Urdu plugin',
context: 'tools',
onclick: function () {
// Open window with a specific url
editor.windowManager.open({
title: 'Write Urdu Here',
url: 'index.html',
width: 700,
height: 600,
});
}
});
return {
getMetadata: function () {
return {
name: "Urdu plugin",
url: "#"
};
}
};
});