mirador_rails 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/controllers/mirador_rails/locales_controller.rb +10 -0
- data/config/routes.rb +7 -0
- data/lib/mirador_rails/exceptions.rb +6 -0
- data/lib/mirador_rails/locale.rb +24 -0
- data/lib/mirador_rails/version.rb +1 -1
- data/lib/mirador_rails.rb +9 -2
- data/mirador_rails.gemspec +3 -0
- data/tasks/mirador_rails.rake +44 -10
- data/vendor/assets/images/border_type_4.png +0 -0
- data/vendor/assets/images/border_type_5.png +0 -0
- data/vendor/assets/javascripts/mirador/mirador.js.erb +20105 -0
- data/vendor/assets/javascripts/mirador.js +4 -1
- data/vendor/assets/locales/de/translation.json +3 -0
- data/vendor/assets/locales/en/translation.json +11 -7
- data/vendor/assets/locales/ko/translation.json +18 -9
- data/vendor/assets/stylesheets/enhancements.scss +36 -0
- data/vendor/assets/stylesheets/mirador-combined.css +1488 -1642
- data/vendor/assets/stylesheets/mirador.css +1 -0
- metadata +52 -174
- data/vendor/assets/javascripts/mirador.min.js +0 -89
- data/vendor/assets/javascripts/mirador.min.js.map +0 -1
- data/vendor/assets/plugins/plugins/advlist/plugin.js +0 -97
- data/vendor/assets/plugins/plugins/advlist/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/anchor/plugin.js +0 -45
- data/vendor/assets/plugins/plugins/anchor/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autolink/plugin.js +0 -194
- data/vendor/assets/plugins/plugins/autolink/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autoresize/plugin.js +0 -152
- data/vendor/assets/plugins/plugins/autoresize/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/autosave/plugin.js +0 -165
- data/vendor/assets/plugins/plugins/autosave/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/bbcode/plugin.js +0 -123
- data/vendor/assets/plugins/plugins/bbcode/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/charmap/plugin.js +0 -370
- data/vendor/assets/plugins/plugins/charmap/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/code/plugin.js +0 -60
- data/vendor/assets/plugins/plugins/code/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/colorpicker/plugin.js +0 -112
- data/vendor/assets/plugins/plugins/colorpicker/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/compat3x/css/dialog.css +0 -118
- data/vendor/assets/plugins/plugins/compat3x/img/buttons.png +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/icons.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/items.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/menu_arrow.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/menu_check.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/progress.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/img/tabs.gif +0 -0
- data/vendor/assets/plugins/plugins/compat3x/plugin.js +0 -297
- data/vendor/assets/plugins/plugins/compat3x/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/compat3x/tiny_mce_popup.js +0 -542
- data/vendor/assets/plugins/plugins/compat3x/utils/editable_selects.js +0 -70
- data/vendor/assets/plugins/plugins/compat3x/utils/form_utils.js +0 -210
- data/vendor/assets/plugins/plugins/compat3x/utils/mctabs.js +0 -164
- data/vendor/assets/plugins/plugins/compat3x/utils/validate.js +0 -252
- data/vendor/assets/plugins/plugins/contextmenu/plugin.js +0 -87
- data/vendor/assets/plugins/plugins/contextmenu/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/directionality/plugin.js +0 -64
- data/vendor/assets/plugins/plugins/directionality/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/vendor/assets/plugins/plugins/emoticons/plugin.js +0 -65
- data/vendor/assets/plugins/plugins/emoticons/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/example/dialog.html +0 -8
- data/vendor/assets/plugins/plugins/example/plugin.js +0 -68
- data/vendor/assets/plugins/plugins/example/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/example_dependency/plugin.js +0 -22
- data/vendor/assets/plugins/plugins/example_dependency/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/fullpage/plugin.js +0 -490
- data/vendor/assets/plugins/plugins/fullpage/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/fullscreen/plugin.js +0 -136
- data/vendor/assets/plugins/plugins/fullscreen/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/hr/plugin.js +0 -30
- data/vendor/assets/plugins/plugins/hr/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/image/plugin.js +0 -439
- data/vendor/assets/plugins/plugins/image/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/importcss/plugin.js +0 -195
- data/vendor/assets/plugins/plugins/importcss/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/insertdatetime/plugin.js +0 -121
- data/vendor/assets/plugins/plugins/insertdatetime/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/layer/plugin.js +0 -225
- data/vendor/assets/plugins/plugins/layer/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/legacyoutput/plugin.js +0 -211
- data/vendor/assets/plugins/plugins/legacyoutput/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/link/plugin.js +0 -400
- data/vendor/assets/plugins/plugins/link/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/lists/plugin.js +0 -791
- data/vendor/assets/plugins/plugins/lists/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/media/moxieplayer.swf +0 -0
- data/vendor/assets/plugins/plugins/media/plugin.js +0 -774
- data/vendor/assets/plugins/plugins/media/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/nonbreaking/plugin.js +0 -53
- data/vendor/assets/plugins/plugins/nonbreaking/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/noneditable/plugin.js +0 -540
- data/vendor/assets/plugins/plugins/noneditable/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/pagebreak/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/pagebreak/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/paste/classes/Clipboard.js +0 -634
- data/vendor/assets/plugins/plugins/paste/classes/Plugin.js +0 -110
- data/vendor/assets/plugins/plugins/paste/classes/Quirks.js +0 -159
- data/vendor/assets/plugins/plugins/paste/classes/Utils.js +0 -130
- data/vendor/assets/plugins/plugins/paste/classes/WordFilter.js +0 -493
- data/vendor/assets/plugins/plugins/paste/plugin.dev.js +0 -120
- data/vendor/assets/plugins/plugins/paste/plugin.js +0 -1625
- data/vendor/assets/plugins/plugins/paste/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/preview/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/preview/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/print/plugin.js +0 -32
- data/vendor/assets/plugins/plugins/print/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/save/plugin.js +0 -94
- data/vendor/assets/plugins/plugins/save/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/searchreplace/plugin.js +0 -594
- data/vendor/assets/plugins/plugins/searchreplace/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/spellchecker/classes/DomTextMatcher.js +0 -470
- data/vendor/assets/plugins/plugins/spellchecker/classes/Plugin.js +0 -436
- data/vendor/assets/plugins/plugins/spellchecker/plugin.dev.js +0 -117
- data/vendor/assets/plugins/plugins/spellchecker/plugin.js +0 -996
- data/vendor/assets/plugins/plugins/spellchecker/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/tabfocus/plugin.js +0 -120
- data/vendor/assets/plugins/plugins/tabfocus/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/table/classes/CellSelection.js +0 -176
- data/vendor/assets/plugins/plugins/table/classes/Dialogs.js +0 -749
- data/vendor/assets/plugins/plugins/table/classes/Plugin.js +0 -422
- data/vendor/assets/plugins/plugins/table/classes/Quirks.js +0 -372
- data/vendor/assets/plugins/plugins/table/classes/TableGrid.js +0 -864
- data/vendor/assets/plugins/plugins/table/plugin.dev.js +0 -118
- data/vendor/assets/plugins/plugins/table/plugin.js +0 -2680
- data/vendor/assets/plugins/plugins/table/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/template/plugin.js +0 -262
- data/vendor/assets/plugins/plugins/template/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/textcolor/plugin.js +0 -272
- data/vendor/assets/plugins/plugins/textcolor/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/textpattern/plugin.js +0 -268
- data/vendor/assets/plugins/plugins/textpattern/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/visualblocks/css/visualblocks.css +0 -135
- data/vendor/assets/plugins/plugins/visualblocks/img/address.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/article.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/aside.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/blockquote.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/div.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/dl.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/figure.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h1.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h2.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h3.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h4.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h5.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/h6.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/hgroup.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/ol.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/p.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/pre.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/section.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/img/ul.gif +0 -0
- data/vendor/assets/plugins/plugins/visualblocks/plugin.js +0 -86
- data/vendor/assets/plugins/plugins/visualblocks/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/visualchars/plugin.js +0 -88
- data/vendor/assets/plugins/plugins/visualchars/plugin.min.js +0 -1
- data/vendor/assets/plugins/plugins/wordcount/plugin.js +0 -69
- data/vendor/assets/plugins/plugins/wordcount/plugin.min.js +0 -1
- data/vendor/assets/skins/skins/lightgray/content.inline.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/content.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.svg +0 -62
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.svg +0 -63
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/skins/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/skins/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/img/trans.gif +0 -0
- data/vendor/assets/skins/skins/lightgray/skin.ie7.min.css +0 -1
- data/vendor/assets/skins/skins/lightgray/skin.min.css +0 -1
- data/vendor/assets/themes/themes/modern/theme.js +0 -617
- data/vendor/assets/themes/themes/modern/theme.min.js +0 -1
@@ -1,123 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* plugin.js
|
3
|
-
*
|
4
|
-
* Copyright, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://www.tinymce.com/license
|
8
|
-
* Contributing: http://www.tinymce.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
/*global tinymce:true */
|
12
|
-
|
13
|
-
(function() {
|
14
|
-
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
15
|
-
init : function(ed) {
|
16
|
-
var self = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
17
|
-
|
18
|
-
ed.on('beforeSetContent', function(e) {
|
19
|
-
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
20
|
-
});
|
21
|
-
|
22
|
-
ed.on('postProcess', function(e) {
|
23
|
-
if (e.set) {
|
24
|
-
e.content = self['_' + dialect + '_bbcode2html'](e.content);
|
25
|
-
}
|
26
|
-
|
27
|
-
if (e.get) {
|
28
|
-
e.content = self['_' + dialect + '_html2bbcode'](e.content);
|
29
|
-
}
|
30
|
-
});
|
31
|
-
},
|
32
|
-
|
33
|
-
getInfo: function() {
|
34
|
-
return {
|
35
|
-
longname: 'BBCode Plugin',
|
36
|
-
author: 'Moxiecode Systems AB',
|
37
|
-
authorurl: 'http://www.tinymce.com',
|
38
|
-
infourl: 'http://www.tinymce.com/wiki.php/Plugin:bbcode'
|
39
|
-
};
|
40
|
-
},
|
41
|
-
|
42
|
-
// Private methods
|
43
|
-
|
44
|
-
// HTML -> BBCode in PunBB dialect
|
45
|
-
_punbb_html2bbcode : function(s) {
|
46
|
-
s = tinymce.trim(s);
|
47
|
-
|
48
|
-
function rep(re, str) {
|
49
|
-
s = s.replace(re, str);
|
50
|
-
}
|
51
|
-
|
52
|
-
// example: <strong> to [b]
|
53
|
-
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi, "[url=$1]$2[/url]");
|
54
|
-
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
55
|
-
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
56
|
-
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[code][color=$1]$2[/color][/code]");
|
57
|
-
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[quote][color=$1]$2[/color][/quote]");
|
58
|
-
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi, "[color=$1]$2[/color]");
|
59
|
-
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi, "[color=$1]$2[/color]");
|
60
|
-
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi, "[size=$1]$2[/size]");
|
61
|
-
rep(/<font>(.*?)<\/font>/gi, "$1");
|
62
|
-
rep(/<img.*?src=\"(.*?)\".*?\/>/gi, "[img]$1[/img]");
|
63
|
-
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi, "[code]$1[/code]");
|
64
|
-
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi, "[quote]$1[/quote]");
|
65
|
-
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi, "[code][b]$1[/b][/code]");
|
66
|
-
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi, "[quote][b]$1[/b][/quote]");
|
67
|
-
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi, "[code][i]$1[/i][/code]");
|
68
|
-
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi, "[quote][i]$1[/i][/quote]");
|
69
|
-
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi, "[code][u]$1[/u][/code]");
|
70
|
-
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi, "[quote][u]$1[/u][/quote]");
|
71
|
-
rep(/<\/(strong|b)>/gi, "[/b]");
|
72
|
-
rep(/<(strong|b)>/gi, "[b]");
|
73
|
-
rep(/<\/(em|i)>/gi, "[/i]");
|
74
|
-
rep(/<(em|i)>/gi, "[i]");
|
75
|
-
rep(/<\/u>/gi, "[/u]");
|
76
|
-
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi, "[u]$1[/u]");
|
77
|
-
rep(/<u>/gi, "[u]");
|
78
|
-
rep(/<blockquote[^>]*>/gi, "[quote]");
|
79
|
-
rep(/<\/blockquote>/gi, "[/quote]");
|
80
|
-
rep(/<br \/>/gi, "\n");
|
81
|
-
rep(/<br\/>/gi, "\n");
|
82
|
-
rep(/<br>/gi, "\n");
|
83
|
-
rep(/<p>/gi, "");
|
84
|
-
rep(/<\/p>/gi, "\n");
|
85
|
-
rep(/ |\u00a0/gi, " ");
|
86
|
-
rep(/"/gi, "\"");
|
87
|
-
rep(/</gi, "<");
|
88
|
-
rep(/>/gi, ">");
|
89
|
-
rep(/&/gi, "&");
|
90
|
-
|
91
|
-
return s;
|
92
|
-
},
|
93
|
-
|
94
|
-
// BBCode -> HTML from PunBB dialect
|
95
|
-
_punbb_bbcode2html : function(s) {
|
96
|
-
s = tinymce.trim(s);
|
97
|
-
|
98
|
-
function rep(re, str) {
|
99
|
-
s = s.replace(re, str);
|
100
|
-
}
|
101
|
-
|
102
|
-
// example: [b] to <strong>
|
103
|
-
rep(/\n/gi, "<br />");
|
104
|
-
rep(/\[b\]/gi, "<strong>");
|
105
|
-
rep(/\[\/b\]/gi, "</strong>");
|
106
|
-
rep(/\[i\]/gi, "<em>");
|
107
|
-
rep(/\[\/i\]/gi, "</em>");
|
108
|
-
rep(/\[u\]/gi, "<u>");
|
109
|
-
rep(/\[\/u\]/gi, "</u>");
|
110
|
-
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, "<a href=\"$1\">$2</a>");
|
111
|
-
rep(/\[url\](.*?)\[\/url\]/gi, "<a href=\"$1\">$1</a>");
|
112
|
-
rep(/\[img\](.*?)\[\/img\]/gi, "<img src=\"$1\" />");
|
113
|
-
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi, "<font color=\"$1\">$2</font>");
|
114
|
-
rep(/\[code\](.*?)\[\/code\]/gi, "<span class=\"codeStyle\">$1</span> ");
|
115
|
-
rep(/\[quote.*?\](.*?)\[\/quote\]/gi, "<span class=\"quoteStyle\">$1</span> ");
|
116
|
-
|
117
|
-
return s;
|
118
|
-
}
|
119
|
-
});
|
120
|
-
|
121
|
-
// Register plugin
|
122
|
-
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
123
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
!function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/<font>(.*?)<\/font>/gi,"$1"),b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),b(/<u>/gi,"[u]"),b(/<blockquote[^>]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/<br \/>/gi,"\n"),b(/<br\/>/gi,"\n"),b(/<br>/gi,"\n"),b(/<p>/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"<br />"),b(/\[b\]/gi,"<strong>"),b(/\[\/b\]/gi,"</strong>"),b(/\[i\]/gi,"<em>"),b(/\[\/i\]/gi,"</em>"),b(/\[u\]/gi,"<u>"),b(/\[\/u\]/gi,"</u>"),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}();
|
@@ -1,370 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* plugin.js
|
3
|
-
*
|
4
|
-
* Copyright, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://www.tinymce.com/license
|
8
|
-
* Contributing: http://www.tinymce.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
/*global tinymce:true */
|
12
|
-
|
13
|
-
tinymce.PluginManager.add('charmap', function(editor) {
|
14
|
-
var charmap = [
|
15
|
-
['160', 'no-break space'],
|
16
|
-
['38', 'ampersand'],
|
17
|
-
['34', 'quotation mark'],
|
18
|
-
// finance
|
19
|
-
['162', 'cent sign'],
|
20
|
-
['8364', 'euro sign'],
|
21
|
-
['163', 'pound sign'],
|
22
|
-
['165', 'yen sign'],
|
23
|
-
// signs
|
24
|
-
['169', 'copyright sign'],
|
25
|
-
['174', 'registered sign'],
|
26
|
-
['8482', 'trade mark sign'],
|
27
|
-
['8240', 'per mille sign'],
|
28
|
-
['181', 'micro sign'],
|
29
|
-
['183', 'middle dot'],
|
30
|
-
['8226', 'bullet'],
|
31
|
-
['8230', 'three dot leader'],
|
32
|
-
['8242', 'minutes / feet'],
|
33
|
-
['8243', 'seconds / inches'],
|
34
|
-
['167', 'section sign'],
|
35
|
-
['182', 'paragraph sign'],
|
36
|
-
['223', 'sharp s / ess-zed'],
|
37
|
-
// quotations
|
38
|
-
['8249', 'single left-pointing angle quotation mark'],
|
39
|
-
['8250', 'single right-pointing angle quotation mark'],
|
40
|
-
['171', 'left pointing guillemet'],
|
41
|
-
['187', 'right pointing guillemet'],
|
42
|
-
['8216', 'left single quotation mark'],
|
43
|
-
['8217', 'right single quotation mark'],
|
44
|
-
['8220', 'left double quotation mark'],
|
45
|
-
['8221', 'right double quotation mark'],
|
46
|
-
['8218', 'single low-9 quotation mark'],
|
47
|
-
['8222', 'double low-9 quotation mark'],
|
48
|
-
['60', 'less-than sign'],
|
49
|
-
['62', 'greater-than sign'],
|
50
|
-
['8804', 'less-than or equal to'],
|
51
|
-
['8805', 'greater-than or equal to'],
|
52
|
-
['8211', 'en dash'],
|
53
|
-
['8212', 'em dash'],
|
54
|
-
['175', 'macron'],
|
55
|
-
['8254', 'overline'],
|
56
|
-
['164', 'currency sign'],
|
57
|
-
['166', 'broken bar'],
|
58
|
-
['168', 'diaeresis'],
|
59
|
-
['161', 'inverted exclamation mark'],
|
60
|
-
['191', 'turned question mark'],
|
61
|
-
['710', 'circumflex accent'],
|
62
|
-
['732', 'small tilde'],
|
63
|
-
['176', 'degree sign'],
|
64
|
-
['8722', 'minus sign'],
|
65
|
-
['177', 'plus-minus sign'],
|
66
|
-
['247', 'division sign'],
|
67
|
-
['8260', 'fraction slash'],
|
68
|
-
['215', 'multiplication sign'],
|
69
|
-
['185', 'superscript one'],
|
70
|
-
['178', 'superscript two'],
|
71
|
-
['179', 'superscript three'],
|
72
|
-
['188', 'fraction one quarter'],
|
73
|
-
['189', 'fraction one half'],
|
74
|
-
['190', 'fraction three quarters'],
|
75
|
-
// math / logical
|
76
|
-
['402', 'function / florin'],
|
77
|
-
['8747', 'integral'],
|
78
|
-
['8721', 'n-ary sumation'],
|
79
|
-
['8734', 'infinity'],
|
80
|
-
['8730', 'square root'],
|
81
|
-
['8764', 'similar to'],
|
82
|
-
['8773', 'approximately equal to'],
|
83
|
-
['8776', 'almost equal to'],
|
84
|
-
['8800', 'not equal to'],
|
85
|
-
['8801', 'identical to'],
|
86
|
-
['8712', 'element of'],
|
87
|
-
['8713', 'not an element of'],
|
88
|
-
['8715', 'contains as member'],
|
89
|
-
['8719', 'n-ary product'],
|
90
|
-
['8743', 'logical and'],
|
91
|
-
['8744', 'logical or'],
|
92
|
-
['172', 'not sign'],
|
93
|
-
['8745', 'intersection'],
|
94
|
-
['8746', 'union'],
|
95
|
-
['8706', 'partial differential'],
|
96
|
-
['8704', 'for all'],
|
97
|
-
['8707', 'there exists'],
|
98
|
-
['8709', 'diameter'],
|
99
|
-
['8711', 'backward difference'],
|
100
|
-
['8727', 'asterisk operator'],
|
101
|
-
['8733', 'proportional to'],
|
102
|
-
['8736', 'angle'],
|
103
|
-
// undefined
|
104
|
-
['180', 'acute accent'],
|
105
|
-
['184', 'cedilla'],
|
106
|
-
['170', 'feminine ordinal indicator'],
|
107
|
-
['186', 'masculine ordinal indicator'],
|
108
|
-
['8224', 'dagger'],
|
109
|
-
['8225', 'double dagger'],
|
110
|
-
// alphabetical special chars
|
111
|
-
['192', 'A - grave'],
|
112
|
-
['193', 'A - acute'],
|
113
|
-
['194', 'A - circumflex'],
|
114
|
-
['195', 'A - tilde'],
|
115
|
-
['196', 'A - diaeresis'],
|
116
|
-
['197', 'A - ring above'],
|
117
|
-
['198', 'ligature AE'],
|
118
|
-
['199', 'C - cedilla'],
|
119
|
-
['200', 'E - grave'],
|
120
|
-
['201', 'E - acute'],
|
121
|
-
['202', 'E - circumflex'],
|
122
|
-
['203', 'E - diaeresis'],
|
123
|
-
['204', 'I - grave'],
|
124
|
-
['205', 'I - acute'],
|
125
|
-
['206', 'I - circumflex'],
|
126
|
-
['207', 'I - diaeresis'],
|
127
|
-
['208', 'ETH'],
|
128
|
-
['209', 'N - tilde'],
|
129
|
-
['210', 'O - grave'],
|
130
|
-
['211', 'O - acute'],
|
131
|
-
['212', 'O - circumflex'],
|
132
|
-
['213', 'O - tilde'],
|
133
|
-
['214', 'O - diaeresis'],
|
134
|
-
['216', 'O - slash'],
|
135
|
-
['338', 'ligature OE'],
|
136
|
-
['352', 'S - caron'],
|
137
|
-
['217', 'U - grave'],
|
138
|
-
['218', 'U - acute'],
|
139
|
-
['219', 'U - circumflex'],
|
140
|
-
['220', 'U - diaeresis'],
|
141
|
-
['221', 'Y - acute'],
|
142
|
-
['376', 'Y - diaeresis'],
|
143
|
-
['222', 'THORN'],
|
144
|
-
['224', 'a - grave'],
|
145
|
-
['225', 'a - acute'],
|
146
|
-
['226', 'a - circumflex'],
|
147
|
-
['227', 'a - tilde'],
|
148
|
-
['228', 'a - diaeresis'],
|
149
|
-
['229', 'a - ring above'],
|
150
|
-
['230', 'ligature ae'],
|
151
|
-
['231', 'c - cedilla'],
|
152
|
-
['232', 'e - grave'],
|
153
|
-
['233', 'e - acute'],
|
154
|
-
['234', 'e - circumflex'],
|
155
|
-
['235', 'e - diaeresis'],
|
156
|
-
['236', 'i - grave'],
|
157
|
-
['237', 'i - acute'],
|
158
|
-
['238', 'i - circumflex'],
|
159
|
-
['239', 'i - diaeresis'],
|
160
|
-
['240', 'eth'],
|
161
|
-
['241', 'n - tilde'],
|
162
|
-
['242', 'o - grave'],
|
163
|
-
['243', 'o - acute'],
|
164
|
-
['244', 'o - circumflex'],
|
165
|
-
['245', 'o - tilde'],
|
166
|
-
['246', 'o - diaeresis'],
|
167
|
-
['248', 'o slash'],
|
168
|
-
['339', 'ligature oe'],
|
169
|
-
['353', 's - caron'],
|
170
|
-
['249', 'u - grave'],
|
171
|
-
['250', 'u - acute'],
|
172
|
-
['251', 'u - circumflex'],
|
173
|
-
['252', 'u - diaeresis'],
|
174
|
-
['253', 'y - acute'],
|
175
|
-
['254', 'thorn'],
|
176
|
-
['255', 'y - diaeresis'],
|
177
|
-
['913', 'Alpha'],
|
178
|
-
['914', 'Beta'],
|
179
|
-
['915', 'Gamma'],
|
180
|
-
['916', 'Delta'],
|
181
|
-
['917', 'Epsilon'],
|
182
|
-
['918', 'Zeta'],
|
183
|
-
['919', 'Eta'],
|
184
|
-
['920', 'Theta'],
|
185
|
-
['921', 'Iota'],
|
186
|
-
['922', 'Kappa'],
|
187
|
-
['923', 'Lambda'],
|
188
|
-
['924', 'Mu'],
|
189
|
-
['925', 'Nu'],
|
190
|
-
['926', 'Xi'],
|
191
|
-
['927', 'Omicron'],
|
192
|
-
['928', 'Pi'],
|
193
|
-
['929', 'Rho'],
|
194
|
-
['931', 'Sigma'],
|
195
|
-
['932', 'Tau'],
|
196
|
-
['933', 'Upsilon'],
|
197
|
-
['934', 'Phi'],
|
198
|
-
['935', 'Chi'],
|
199
|
-
['936', 'Psi'],
|
200
|
-
['937', 'Omega'],
|
201
|
-
['945', 'alpha'],
|
202
|
-
['946', 'beta'],
|
203
|
-
['947', 'gamma'],
|
204
|
-
['948', 'delta'],
|
205
|
-
['949', 'epsilon'],
|
206
|
-
['950', 'zeta'],
|
207
|
-
['951', 'eta'],
|
208
|
-
['952', 'theta'],
|
209
|
-
['953', 'iota'],
|
210
|
-
['954', 'kappa'],
|
211
|
-
['955', 'lambda'],
|
212
|
-
['956', 'mu'],
|
213
|
-
['957', 'nu'],
|
214
|
-
['958', 'xi'],
|
215
|
-
['959', 'omicron'],
|
216
|
-
['960', 'pi'],
|
217
|
-
['961', 'rho'],
|
218
|
-
['962', 'final sigma'],
|
219
|
-
['963', 'sigma'],
|
220
|
-
['964', 'tau'],
|
221
|
-
['965', 'upsilon'],
|
222
|
-
['966', 'phi'],
|
223
|
-
['967', 'chi'],
|
224
|
-
['968', 'psi'],
|
225
|
-
['969', 'omega'],
|
226
|
-
// symbols
|
227
|
-
['8501', 'alef symbol'],
|
228
|
-
['982', 'pi symbol'],
|
229
|
-
['8476', 'real part symbol'],
|
230
|
-
['978', 'upsilon - hook symbol'],
|
231
|
-
['8472', 'Weierstrass p'],
|
232
|
-
['8465', 'imaginary part'],
|
233
|
-
// arrows
|
234
|
-
['8592', 'leftwards arrow'],
|
235
|
-
['8593', 'upwards arrow'],
|
236
|
-
['8594', 'rightwards arrow'],
|
237
|
-
['8595', 'downwards arrow'],
|
238
|
-
['8596', 'left right arrow'],
|
239
|
-
['8629', 'carriage return'],
|
240
|
-
['8656', 'leftwards double arrow'],
|
241
|
-
['8657', 'upwards double arrow'],
|
242
|
-
['8658', 'rightwards double arrow'],
|
243
|
-
['8659', 'downwards double arrow'],
|
244
|
-
['8660', 'left right double arrow'],
|
245
|
-
['8756', 'therefore'],
|
246
|
-
['8834', 'subset of'],
|
247
|
-
['8835', 'superset of'],
|
248
|
-
['8836', 'not a subset of'],
|
249
|
-
['8838', 'subset of or equal to'],
|
250
|
-
['8839', 'superset of or equal to'],
|
251
|
-
['8853', 'circled plus'],
|
252
|
-
['8855', 'circled times'],
|
253
|
-
['8869', 'perpendicular'],
|
254
|
-
['8901', 'dot operator'],
|
255
|
-
['8968', 'left ceiling'],
|
256
|
-
['8969', 'right ceiling'],
|
257
|
-
['8970', 'left floor'],
|
258
|
-
['8971', 'right floor'],
|
259
|
-
['9001', 'left-pointing angle bracket'],
|
260
|
-
['9002', 'right-pointing angle bracket'],
|
261
|
-
['9674', 'lozenge'],
|
262
|
-
['9824', 'black spade suit'],
|
263
|
-
['9827', 'black club suit'],
|
264
|
-
['9829', 'black heart suit'],
|
265
|
-
['9830', 'black diamond suit'],
|
266
|
-
['8194', 'en space'],
|
267
|
-
['8195', 'em space'],
|
268
|
-
['8201', 'thin space'],
|
269
|
-
['8204', 'zero width non-joiner'],
|
270
|
-
['8205', 'zero width joiner'],
|
271
|
-
['8206', 'left-to-right mark'],
|
272
|
-
['8207', 'right-to-left mark'],
|
273
|
-
['173', 'soft hyphen']
|
274
|
-
];
|
275
|
-
|
276
|
-
function showDialog() {
|
277
|
-
var gridHtml, x, y, win;
|
278
|
-
|
279
|
-
function getParentTd(elm) {
|
280
|
-
while (elm) {
|
281
|
-
if (elm.nodeName == 'TD') {
|
282
|
-
return elm;
|
283
|
-
}
|
284
|
-
|
285
|
-
elm = elm.parentNode;
|
286
|
-
}
|
287
|
-
}
|
288
|
-
|
289
|
-
gridHtml = '<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';
|
290
|
-
|
291
|
-
var width = 25;
|
292
|
-
for (y = 0; y < 10; y++) {
|
293
|
-
gridHtml += '<tr>';
|
294
|
-
|
295
|
-
for (x = 0; x < width; x++) {
|
296
|
-
var chr = charmap[y * width + x];
|
297
|
-
|
298
|
-
gridHtml += '<td title="' + chr[1] + '"><div tabindex="-1" title="' + chr[1] + '" role="button">' +
|
299
|
-
(chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ') + '</div></td>';
|
300
|
-
}
|
301
|
-
|
302
|
-
gridHtml += '</tr>';
|
303
|
-
}
|
304
|
-
|
305
|
-
gridHtml += '</tbody></table>';
|
306
|
-
|
307
|
-
var charMapPanel = {
|
308
|
-
type: 'container',
|
309
|
-
html: gridHtml,
|
310
|
-
onclick: function(e) {
|
311
|
-
var target = e.target;
|
312
|
-
|
313
|
-
if (target.tagName == 'TD') {
|
314
|
-
target = target.firstChild;
|
315
|
-
}
|
316
|
-
|
317
|
-
if (target.tagName == 'DIV') {
|
318
|
-
editor.execCommand('mceInsertContent', false, target.firstChild.data);
|
319
|
-
|
320
|
-
if (!e.ctrlKey) {
|
321
|
-
win.close();
|
322
|
-
}
|
323
|
-
}
|
324
|
-
},
|
325
|
-
onmouseover: function(e) {
|
326
|
-
var td = getParentTd(e.target);
|
327
|
-
|
328
|
-
if (td) {
|
329
|
-
win.find('#preview').text(td.firstChild.firstChild.data);
|
330
|
-
}
|
331
|
-
}
|
332
|
-
};
|
333
|
-
|
334
|
-
win = editor.windowManager.open({
|
335
|
-
title: "Special character",
|
336
|
-
spacing: 10,
|
337
|
-
padding: 10,
|
338
|
-
items: [
|
339
|
-
charMapPanel,
|
340
|
-
{
|
341
|
-
type: 'label',
|
342
|
-
name: 'preview',
|
343
|
-
text: ' ',
|
344
|
-
style: 'font-size: 40px; text-align: center',
|
345
|
-
border: 1,
|
346
|
-
minWidth: 100,
|
347
|
-
minHeight: 80
|
348
|
-
}
|
349
|
-
],
|
350
|
-
buttons: [
|
351
|
-
{text: "Close", onclick: function() {
|
352
|
-
win.close();
|
353
|
-
}}
|
354
|
-
]
|
355
|
-
});
|
356
|
-
}
|
357
|
-
|
358
|
-
editor.addButton('charmap', {
|
359
|
-
icon: 'charmap',
|
360
|
-
tooltip: 'Special character',
|
361
|
-
onclick: showDialog
|
362
|
-
});
|
363
|
-
|
364
|
-
editor.addMenuItem('charmap', {
|
365
|
-
icon: 'charmap',
|
366
|
-
text: 'Special character',
|
367
|
-
onclick: showDialog,
|
368
|
-
context: 'insert'
|
369
|
-
});
|
370
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
tinymce.PluginManager.add("charmap",function(a){function b(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var d,e,f,g;d='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var h=25;for(f=0;10>f;f++){for(d+="<tr>",e=0;h>e;e++){var i=c[f*h+e];d+='<td title="'+i[1]+'"><div tabindex="-1" title="'+i[1]+'" role="button">'+(i?String.fromCharCode(parseInt(i[0],10)):" ")+"</div></td>"}d+="</tr>"}d+="</tbody></table>";var j={type:"container",html:d,onclick:function(b){var c=b.target;"TD"==c.tagName&&(c=c.firstChild),"DIV"==c.tagName&&(a.execCommand("mceInsertContent",!1,c.firstChild.data),b.ctrlKey||g.close())},onmouseover:function(a){var c=b(a.target);c&&g.find("#preview").text(c.firstChild.firstChild.data)}};g=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[j,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){g.close()}}]})}var c=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];a.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:b}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:b,context:"insert"})});
|
@@ -1,60 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* plugin.js
|
3
|
-
*
|
4
|
-
* Copyright, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://www.tinymce.com/license
|
8
|
-
* Contributing: http://www.tinymce.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
/*global tinymce:true */
|
12
|
-
|
13
|
-
tinymce.PluginManager.add('code', function(editor) {
|
14
|
-
function showDialog() {
|
15
|
-
var win = editor.windowManager.open({
|
16
|
-
title: "Source code",
|
17
|
-
body: {
|
18
|
-
type: 'textbox',
|
19
|
-
name: 'code',
|
20
|
-
multiline: true,
|
21
|
-
minWidth: editor.getParam("code_dialog_width", 600),
|
22
|
-
minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)),
|
23
|
-
spellcheck: false,
|
24
|
-
style: 'direction: ltr; text-align: left'
|
25
|
-
},
|
26
|
-
onSubmit: function(e) {
|
27
|
-
// We get a lovely "Wrong document" error in IE 11 if we
|
28
|
-
// don't move the focus to the editor before creating an undo
|
29
|
-
// transation since it tries to make a bookmark for the current selection
|
30
|
-
editor.focus();
|
31
|
-
|
32
|
-
editor.undoManager.transact(function() {
|
33
|
-
editor.setContent(e.data.code);
|
34
|
-
});
|
35
|
-
|
36
|
-
editor.selection.setCursorLocation();
|
37
|
-
editor.nodeChanged();
|
38
|
-
}
|
39
|
-
});
|
40
|
-
|
41
|
-
// Gecko has a major performance issue with textarea
|
42
|
-
// contents so we need to set it when all reflows are done
|
43
|
-
win.find('#code').value(editor.getContent({source_view: true}));
|
44
|
-
}
|
45
|
-
|
46
|
-
editor.addCommand("mceCodeEditor", showDialog);
|
47
|
-
|
48
|
-
editor.addButton('code', {
|
49
|
-
icon: 'code',
|
50
|
-
tooltip: 'Source code',
|
51
|
-
onclick: showDialog
|
52
|
-
});
|
53
|
-
|
54
|
-
editor.addMenuItem('code', {
|
55
|
-
icon: 'code',
|
56
|
-
text: 'Source code',
|
57
|
-
context: 'tools',
|
58
|
-
onclick: showDialog
|
59
|
-
});
|
60
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})});
|