tb_core 0.9.17 → 0.9.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/app/assets/javascripts/spud/admin/editor.js +1 -1
- data/lib/spud_core/engine.rb +1 -2
- data/lib/spud_core/version.rb +1 -1
- metadata +2 -36
- data/app/assets/libs/tiny_mce/plugins/advlist/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/advlist/editor_plugin_src.js +0 -176
- data/app/assets/libs/tiny_mce/plugins/autoresize/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/autoresize/editor_plugin_src.js +0 -119
- data/app/assets/libs/tiny_mce/plugins/contextmenu/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/contextmenu/editor_plugin_src.js +0 -161
- data/app/assets/libs/tiny_mce/plugins/directionality/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/directionality/editor_plugin_src.js +0 -82
- data/app/assets/libs/tiny_mce/plugins/example/dialog.htm +0 -22
- data/app/assets/libs/tiny_mce/plugins/example/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/example/editor_plugin_src.js +0 -84
- data/app/assets/libs/tiny_mce/plugins/example/img/example.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/example/js/dialog.js +0 -19
- data/app/assets/libs/tiny_mce/plugins/example/langs/en.js +0 -3
- data/app/assets/libs/tiny_mce/plugins/example/langs/en_dlg.js +0 -3
- data/app/assets/libs/tiny_mce/plugins/example_dependency/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/example_dependency/editor_plugin_src.js +0 -50
- data/app/assets/libs/tiny_mce/plugins/iespell/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/iespell/editor_plugin_src.js +0 -54
- data/app/assets/libs/tiny_mce/plugins/layer/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/layer/editor_plugin_src.js +0 -262
- data/app/assets/libs/tiny_mce/plugins/spellchecker/css/content.css +0 -1
- data/app/assets/libs/tiny_mce/plugins/spellchecker/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/spellchecker/editor_plugin_src.js +0 -436
- data/app/assets/libs/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/app/assets/libs/tiny_mce/plugins/style/css/props.css +0 -14
- data/app/assets/libs/tiny_mce/plugins/style/editor_plugin.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/style/editor_plugin_src.js +0 -71
- data/app/assets/libs/tiny_mce/plugins/style/js/props.js +0 -709
- data/app/assets/libs/tiny_mce/plugins/style/langs/en_dlg.js +0 -1
- data/app/assets/libs/tiny_mce/plugins/style/props.htm +0 -845
- data/app/assets/libs/tiny_mce/plugins/style/readme.txt +0 -19
- data/app/assets/stylesheets/spud/admin/settings.css +0 -4
- data/app/assets/stylesheets/spud/admin/users.css +0 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzU2Mzg1MWRiNGM0YTY2NjA0MDEwZDNhMzQ3NjY1OWViMWYwYzc4OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzRkY2M5NjY0MTAzMGZlOTI1MTlhMDMxMmJlMDc0YTgxZWM1MWFmZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDc2ZDNjOTcyNzU1YTU0NDI5YzZlZGI2NzRjOTAzMDljYzI1ZWEwYTRkODM0
|
10
|
+
YmQyNzRjOTRmZGNiZTY5Mjc0ZDI3OTY0OTMyZWM4MDEzMTIxMjJmMjgzZDVi
|
11
|
+
OTY3MTk1ZWMzYzczOTllNTEwNDZlMmQ0Yzg1YmE1MWRkNjk2ZTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjQ2Y2FiYzhlMGEzOGJhZGFiZGM4MDY3YTJjYzViM2MwOTM4ZjlhNmQ2ZTMz
|
14
|
+
OWQ1NDdhZWFmMDFhYWI4MmVhNTYwZDgyZDI0NDRjOWQ5YzZmNzAyNDVlZTQw
|
15
|
+
ZDBmYjdjZjBkY2JhNjAyM2U3NjI3OGMxNjdhM2Y5Yjg1OGE4NzU=
|
@@ -8,7 +8,7 @@ spud.admin.editor = {};
|
|
8
8
|
var editor = spud.admin.editor;
|
9
9
|
|
10
10
|
var registeredPlugins = [
|
11
|
-
'autolink','lists','
|
11
|
+
'autolink','lists','table','tableDropdown','advhr','advimage','advlink','inlinepopups','media','paste'
|
12
12
|
];
|
13
13
|
|
14
14
|
var registeredButtons = [
|
data/lib/spud_core/engine.rb
CHANGED
data/lib/spud_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Woods
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -323,27 +323,8 @@ files:
|
|
323
323
|
- app/assets/libs/tiny_mce/plugins/advlink/js/advlink.js
|
324
324
|
- app/assets/libs/tiny_mce/plugins/advlink/langs/en_dlg.js
|
325
325
|
- app/assets/libs/tiny_mce/plugins/advlink/link.htm
|
326
|
-
- app/assets/libs/tiny_mce/plugins/advlist/editor_plugin.js
|
327
|
-
- app/assets/libs/tiny_mce/plugins/advlist/editor_plugin_src.js
|
328
326
|
- app/assets/libs/tiny_mce/plugins/autolink/editor_plugin.js
|
329
327
|
- app/assets/libs/tiny_mce/plugins/autolink/editor_plugin_src.js
|
330
|
-
- app/assets/libs/tiny_mce/plugins/autoresize/editor_plugin.js
|
331
|
-
- app/assets/libs/tiny_mce/plugins/autoresize/editor_plugin_src.js
|
332
|
-
- app/assets/libs/tiny_mce/plugins/contextmenu/editor_plugin.js
|
333
|
-
- app/assets/libs/tiny_mce/plugins/contextmenu/editor_plugin_src.js
|
334
|
-
- app/assets/libs/tiny_mce/plugins/directionality/editor_plugin.js
|
335
|
-
- app/assets/libs/tiny_mce/plugins/directionality/editor_plugin_src.js
|
336
|
-
- app/assets/libs/tiny_mce/plugins/example/dialog.htm
|
337
|
-
- app/assets/libs/tiny_mce/plugins/example/editor_plugin.js
|
338
|
-
- app/assets/libs/tiny_mce/plugins/example/editor_plugin_src.js
|
339
|
-
- app/assets/libs/tiny_mce/plugins/example/img/example.gif
|
340
|
-
- app/assets/libs/tiny_mce/plugins/example/js/dialog.js
|
341
|
-
- app/assets/libs/tiny_mce/plugins/example/langs/en.js
|
342
|
-
- app/assets/libs/tiny_mce/plugins/example/langs/en_dlg.js
|
343
|
-
- app/assets/libs/tiny_mce/plugins/example_dependency/editor_plugin.js
|
344
|
-
- app/assets/libs/tiny_mce/plugins/example_dependency/editor_plugin_src.js
|
345
|
-
- app/assets/libs/tiny_mce/plugins/iespell/editor_plugin.js
|
346
|
-
- app/assets/libs/tiny_mce/plugins/iespell/editor_plugin_src.js
|
347
328
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/editor_plugin.js
|
348
329
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
|
349
330
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
|
@@ -355,8 +336,6 @@ files:
|
|
355
336
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
|
356
337
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
|
357
338
|
- app/assets/libs/tiny_mce/plugins/inlinepopups/template.htm
|
358
|
-
- app/assets/libs/tiny_mce/plugins/layer/editor_plugin.js
|
359
|
-
- app/assets/libs/tiny_mce/plugins/layer/editor_plugin_src.js
|
360
339
|
- app/assets/libs/tiny_mce/plugins/lists/editor_plugin.js
|
361
340
|
- app/assets/libs/tiny_mce/plugins/lists/editor_plugin_src.js
|
362
341
|
- app/assets/libs/tiny_mce/plugins/media/css/media.css
|
@@ -374,17 +353,6 @@ files:
|
|
374
353
|
- app/assets/libs/tiny_mce/plugins/paste/langs/en_dlg.js
|
375
354
|
- app/assets/libs/tiny_mce/plugins/paste/pastetext.htm
|
376
355
|
- app/assets/libs/tiny_mce/plugins/paste/pasteword.htm
|
377
|
-
- app/assets/libs/tiny_mce/plugins/spellchecker/css/content.css
|
378
|
-
- app/assets/libs/tiny_mce/plugins/spellchecker/editor_plugin.js
|
379
|
-
- app/assets/libs/tiny_mce/plugins/spellchecker/editor_plugin_src.js
|
380
|
-
- app/assets/libs/tiny_mce/plugins/spellchecker/img/wline.gif
|
381
|
-
- app/assets/libs/tiny_mce/plugins/style/css/props.css
|
382
|
-
- app/assets/libs/tiny_mce/plugins/style/editor_plugin.js
|
383
|
-
- app/assets/libs/tiny_mce/plugins/style/editor_plugin_src.js
|
384
|
-
- app/assets/libs/tiny_mce/plugins/style/js/props.js
|
385
|
-
- app/assets/libs/tiny_mce/plugins/style/langs/en_dlg.js
|
386
|
-
- app/assets/libs/tiny_mce/plugins/style/props.htm
|
387
|
-
- app/assets/libs/tiny_mce/plugins/style/readme.txt
|
388
356
|
- app/assets/libs/tiny_mce/plugins/table/cell.htm
|
389
357
|
- app/assets/libs/tiny_mce/plugins/table/css/cell.css
|
390
358
|
- app/assets/libs/tiny_mce/plugins/table/css/row.css
|
@@ -468,8 +436,6 @@ files:
|
|
468
436
|
- app/assets/libs/tiny_mce/utils/validate.js
|
469
437
|
- app/assets/stylesheets/spud/admin/application.css
|
470
438
|
- app/assets/stylesheets/spud/admin/jquery-ui.css
|
471
|
-
- app/assets/stylesheets/spud/admin/settings.css
|
472
|
-
- app/assets/stylesheets/spud/admin/users.css
|
473
439
|
- app/assets/stylesheets/spud/forms.css
|
474
440
|
- app/assets/stylesheets/spud/login/application.css
|
475
441
|
- app/assets/stylesheets/spud/login.css
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
|
@@ -1,176 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
var each = tinymce.each;
|
13
|
-
|
14
|
-
tinymce.create('tinymce.plugins.AdvListPlugin', {
|
15
|
-
init : function(ed, url) {
|
16
|
-
var t = this;
|
17
|
-
|
18
|
-
t.editor = ed;
|
19
|
-
|
20
|
-
function buildFormats(str) {
|
21
|
-
var formats = [];
|
22
|
-
|
23
|
-
each(str.split(/,/), function(type) {
|
24
|
-
formats.push({
|
25
|
-
title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')),
|
26
|
-
styles : {
|
27
|
-
listStyleType : type == 'default' ? '' : type
|
28
|
-
}
|
29
|
-
});
|
30
|
-
});
|
31
|
-
|
32
|
-
return formats;
|
33
|
-
};
|
34
|
-
|
35
|
-
// Setup number formats from config or default
|
36
|
-
t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
|
37
|
-
t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
|
38
|
-
|
39
|
-
if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent))
|
40
|
-
t.isIE7 = true;
|
41
|
-
},
|
42
|
-
|
43
|
-
createControl: function(name, cm) {
|
44
|
-
var t = this, btn, format, editor = t.editor;
|
45
|
-
|
46
|
-
if (name == 'numlist' || name == 'bullist') {
|
47
|
-
// Default to first item if it's a default item
|
48
|
-
if (t[name][0].title == 'advlist.def')
|
49
|
-
format = t[name][0];
|
50
|
-
|
51
|
-
function hasFormat(node, format) {
|
52
|
-
var state = true;
|
53
|
-
|
54
|
-
each(format.styles, function(value, name) {
|
55
|
-
// Format doesn't match
|
56
|
-
if (editor.dom.getStyle(node, name) != value) {
|
57
|
-
state = false;
|
58
|
-
return false;
|
59
|
-
}
|
60
|
-
});
|
61
|
-
|
62
|
-
return state;
|
63
|
-
};
|
64
|
-
|
65
|
-
function applyListFormat() {
|
66
|
-
var list, dom = editor.dom, sel = editor.selection;
|
67
|
-
|
68
|
-
// Check for existing list element
|
69
|
-
list = dom.getParent(sel.getNode(), 'ol,ul');
|
70
|
-
|
71
|
-
// Switch/add list type if needed
|
72
|
-
if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
|
73
|
-
editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
74
|
-
|
75
|
-
// Append styles to new list element
|
76
|
-
if (format) {
|
77
|
-
list = dom.getParent(sel.getNode(), 'ol,ul');
|
78
|
-
if (list) {
|
79
|
-
dom.setStyles(list, format.styles);
|
80
|
-
list.removeAttribute('data-mce-style');
|
81
|
-
}
|
82
|
-
}
|
83
|
-
|
84
|
-
editor.focus();
|
85
|
-
};
|
86
|
-
|
87
|
-
btn = cm.createSplitButton(name, {
|
88
|
-
title : 'advanced.' + name + '_desc',
|
89
|
-
'class' : 'mce_' + name,
|
90
|
-
onclick : function() {
|
91
|
-
applyListFormat();
|
92
|
-
}
|
93
|
-
});
|
94
|
-
|
95
|
-
btn.onRenderMenu.add(function(btn, menu) {
|
96
|
-
menu.onHideMenu.add(function() {
|
97
|
-
if (t.bookmark) {
|
98
|
-
editor.selection.moveToBookmark(t.bookmark);
|
99
|
-
t.bookmark = 0;
|
100
|
-
}
|
101
|
-
});
|
102
|
-
|
103
|
-
menu.onShowMenu.add(function() {
|
104
|
-
var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList;
|
105
|
-
|
106
|
-
if (list || format) {
|
107
|
-
fmtList = t[name];
|
108
|
-
|
109
|
-
// Unselect existing items
|
110
|
-
each(menu.items, function(item) {
|
111
|
-
var state = true;
|
112
|
-
|
113
|
-
item.setSelected(0);
|
114
|
-
|
115
|
-
if (list && !item.isDisabled()) {
|
116
|
-
each(fmtList, function(fmt) {
|
117
|
-
if (fmt.id == item.id) {
|
118
|
-
if (!hasFormat(list, fmt)) {
|
119
|
-
state = false;
|
120
|
-
return false;
|
121
|
-
}
|
122
|
-
}
|
123
|
-
});
|
124
|
-
|
125
|
-
if (state)
|
126
|
-
item.setSelected(1);
|
127
|
-
}
|
128
|
-
});
|
129
|
-
|
130
|
-
// Select the current format
|
131
|
-
if (!list)
|
132
|
-
menu.items[format.id].setSelected(1);
|
133
|
-
}
|
134
|
-
|
135
|
-
editor.focus();
|
136
|
-
|
137
|
-
// IE looses it's selection so store it away and restore it later
|
138
|
-
if (tinymce.isIE) {
|
139
|
-
t.bookmark = editor.selection.getBookmark(1);
|
140
|
-
}
|
141
|
-
});
|
142
|
-
|
143
|
-
menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1);
|
144
|
-
|
145
|
-
each(t[name], function(item) {
|
146
|
-
// IE<8 doesn't support lower-greek, skip it
|
147
|
-
if (t.isIE7 && item.styles.listStyleType == 'lower-greek')
|
148
|
-
return;
|
149
|
-
|
150
|
-
item.id = editor.dom.uniqueId();
|
151
|
-
|
152
|
-
menu.add({id : item.id, title : item.title, onclick : function() {
|
153
|
-
format = item;
|
154
|
-
applyListFormat();
|
155
|
-
}});
|
156
|
-
});
|
157
|
-
});
|
158
|
-
|
159
|
-
return btn;
|
160
|
-
}
|
161
|
-
},
|
162
|
-
|
163
|
-
getInfo : function() {
|
164
|
-
return {
|
165
|
-
longname : 'Advanced lists',
|
166
|
-
author : 'Moxiecode Systems AB',
|
167
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
168
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist',
|
169
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
170
|
-
};
|
171
|
-
}
|
172
|
-
});
|
173
|
-
|
174
|
-
// Register plugin
|
175
|
-
tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin);
|
176
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
|
@@ -1,119 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
/**
|
13
|
-
* Auto Resize
|
14
|
-
*
|
15
|
-
* This plugin automatically resizes the content area to fit its content height.
|
16
|
-
* It will retain a minimum height, which is the height of the content area when
|
17
|
-
* it's initialized.
|
18
|
-
*/
|
19
|
-
tinymce.create('tinymce.plugins.AutoResizePlugin', {
|
20
|
-
/**
|
21
|
-
* Initializes the plugin, this will be executed after the plugin has been created.
|
22
|
-
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
23
|
-
* of the editor instance to intercept that event.
|
24
|
-
*
|
25
|
-
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
26
|
-
* @param {string} url Absolute URL to where the plugin is located.
|
27
|
-
*/
|
28
|
-
init : function(ed, url) {
|
29
|
-
var t = this, oldSize = 0;
|
30
|
-
|
31
|
-
if (ed.getParam('fullscreen_is_enabled'))
|
32
|
-
return;
|
33
|
-
|
34
|
-
/**
|
35
|
-
* This method gets executed each time the editor needs to resize.
|
36
|
-
*/
|
37
|
-
function resize() {
|
38
|
-
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
39
|
-
|
40
|
-
// Get height differently depending on the browser used
|
41
|
-
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
|
42
|
-
|
43
|
-
// Don't make it smaller than the minimum height
|
44
|
-
if (myHeight > t.autoresize_min_height)
|
45
|
-
resizeHeight = myHeight;
|
46
|
-
|
47
|
-
// If a maximum height has been defined don't exceed this height
|
48
|
-
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
|
49
|
-
resizeHeight = t.autoresize_max_height;
|
50
|
-
body.style.overflowY = "auto";
|
51
|
-
de.style.overflowY = "auto"; // Old IE
|
52
|
-
} else {
|
53
|
-
body.style.overflowY = "hidden";
|
54
|
-
de.style.overflowY = "hidden"; // Old IE
|
55
|
-
body.scrollTop = 0;
|
56
|
-
}
|
57
|
-
|
58
|
-
// Resize content element
|
59
|
-
if (resizeHeight !== oldSize) {
|
60
|
-
deltaSize = resizeHeight - oldSize;
|
61
|
-
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
62
|
-
oldSize = resizeHeight;
|
63
|
-
|
64
|
-
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
65
|
-
// So we need to continue to resize the iframe down until the size gets fixed
|
66
|
-
if (tinymce.isWebKit && deltaSize < 0)
|
67
|
-
resize();
|
68
|
-
}
|
69
|
-
};
|
70
|
-
|
71
|
-
t.editor = ed;
|
72
|
-
|
73
|
-
// Define minimum height
|
74
|
-
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
|
75
|
-
|
76
|
-
// Define maximum height
|
77
|
-
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
|
78
|
-
|
79
|
-
// Add padding at the bottom for better UX
|
80
|
-
ed.onInit.add(function(ed){
|
81
|
-
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
|
82
|
-
});
|
83
|
-
|
84
|
-
// Add appropriate listeners for resizing content area
|
85
|
-
ed.onChange.add(resize);
|
86
|
-
ed.onSetContent.add(resize);
|
87
|
-
ed.onPaste.add(resize);
|
88
|
-
ed.onKeyUp.add(resize);
|
89
|
-
ed.onPostRender.add(resize);
|
90
|
-
|
91
|
-
if (ed.getParam('autoresize_on_init', true)) {
|
92
|
-
ed.onLoad.add(resize);
|
93
|
-
ed.onLoadContent.add(resize);
|
94
|
-
}
|
95
|
-
|
96
|
-
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
97
|
-
ed.addCommand('mceAutoResize', resize);
|
98
|
-
},
|
99
|
-
|
100
|
-
/**
|
101
|
-
* Returns information about the plugin as a name/value array.
|
102
|
-
* The current keys are longname, author, authorurl, infourl and version.
|
103
|
-
*
|
104
|
-
* @return {Object} Name/value array containing information about the plugin.
|
105
|
-
*/
|
106
|
-
getInfo : function() {
|
107
|
-
return {
|
108
|
-
longname : 'Auto Resize',
|
109
|
-
author : 'Moxiecode Systems AB',
|
110
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
111
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
|
112
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
113
|
-
};
|
114
|
-
}
|
115
|
-
});
|
116
|
-
|
117
|
-
// Register plugin
|
118
|
-
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
|
119
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
|
@@ -1,161 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
|
13
|
-
|
14
|
-
/**
|
15
|
-
* This plugin a context menu to TinyMCE editor instances.
|
16
|
-
*
|
17
|
-
* @class tinymce.plugins.ContextMenu
|
18
|
-
*/
|
19
|
-
tinymce.create('tinymce.plugins.ContextMenu', {
|
20
|
-
/**
|
21
|
-
* Initializes the plugin, this will be executed after the plugin has been created.
|
22
|
-
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
23
|
-
* of the editor instance to intercept that event.
|
24
|
-
*
|
25
|
-
* @method init
|
26
|
-
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
27
|
-
* @param {string} url Absolute URL to where the plugin is located.
|
28
|
-
*/
|
29
|
-
init : function(ed) {
|
30
|
-
var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey;
|
31
|
-
|
32
|
-
t.editor = ed;
|
33
|
-
|
34
|
-
contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native;
|
35
|
-
|
36
|
-
/**
|
37
|
-
* This event gets fired when the context menu is shown.
|
38
|
-
*
|
39
|
-
* @event onContextMenu
|
40
|
-
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
|
41
|
-
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
|
42
|
-
*/
|
43
|
-
t.onContextMenu = new tinymce.util.Dispatcher(this);
|
44
|
-
|
45
|
-
showMenu = ed.onContextMenu.add(function(ed, e) {
|
46
|
-
// Block TinyMCE menu on ctrlKey and work around Safari issue
|
47
|
-
if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative)
|
48
|
-
return;
|
49
|
-
|
50
|
-
Event.cancel(e);
|
51
|
-
|
52
|
-
// Select the image if it's clicked. WebKit would other wise expand the selection
|
53
|
-
if (e.target.nodeName == 'IMG')
|
54
|
-
ed.selection.select(e.target);
|
55
|
-
|
56
|
-
t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY);
|
57
|
-
Event.add(ed.getDoc(), 'click', function(e) {
|
58
|
-
hide(ed, e);
|
59
|
-
});
|
60
|
-
|
61
|
-
ed.nodeChanged();
|
62
|
-
});
|
63
|
-
|
64
|
-
ed.onRemove.add(function() {
|
65
|
-
if (t._menu)
|
66
|
-
t._menu.removeAll();
|
67
|
-
});
|
68
|
-
|
69
|
-
function hide(ed, e) {
|
70
|
-
realCtrlKey = 0;
|
71
|
-
|
72
|
-
// Since the contextmenu event moves
|
73
|
-
// the selection we need to store it away
|
74
|
-
if (e && e.button == 2) {
|
75
|
-
realCtrlKey = e.ctrlKey;
|
76
|
-
return;
|
77
|
-
}
|
78
|
-
|
79
|
-
if (t._menu) {
|
80
|
-
t._menu.removeAll();
|
81
|
-
t._menu.destroy();
|
82
|
-
Event.remove(ed.getDoc(), 'click', hide);
|
83
|
-
t._menu = null;
|
84
|
-
}
|
85
|
-
};
|
86
|
-
|
87
|
-
ed.onMouseDown.add(hide);
|
88
|
-
ed.onKeyDown.add(hide);
|
89
|
-
ed.onKeyDown.add(function(ed, e) {
|
90
|
-
if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) {
|
91
|
-
Event.cancel(e);
|
92
|
-
showMenu(ed, e);
|
93
|
-
}
|
94
|
-
});
|
95
|
-
},
|
96
|
-
|
97
|
-
/**
|
98
|
-
* Returns information about the plugin as a name/value array.
|
99
|
-
* The current keys are longname, author, authorurl, infourl and version.
|
100
|
-
*
|
101
|
-
* @method getInfo
|
102
|
-
* @return {Object} Name/value array containing information about the plugin.
|
103
|
-
*/
|
104
|
-
getInfo : function() {
|
105
|
-
return {
|
106
|
-
longname : 'Contextmenu',
|
107
|
-
author : 'Moxiecode Systems AB',
|
108
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
109
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
|
110
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
111
|
-
};
|
112
|
-
},
|
113
|
-
|
114
|
-
_getMenu : function(ed) {
|
115
|
-
var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p;
|
116
|
-
|
117
|
-
if (m) {
|
118
|
-
m.removeAll();
|
119
|
-
m.destroy();
|
120
|
-
}
|
121
|
-
|
122
|
-
p = DOM.getPos(ed.getContentAreaContainer());
|
123
|
-
|
124
|
-
m = ed.controlManager.createDropMenu('contextmenu', {
|
125
|
-
offset_x : p.x + ed.getParam('contextmenu_offset_x', 0),
|
126
|
-
offset_y : p.y + ed.getParam('contextmenu_offset_y', 0),
|
127
|
-
constrain : 1,
|
128
|
-
keyboard_focus: true
|
129
|
-
});
|
130
|
-
|
131
|
-
t._menu = m;
|
132
|
-
|
133
|
-
m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
|
134
|
-
m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
|
135
|
-
m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
|
136
|
-
|
137
|
-
if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
|
138
|
-
m.addSeparator();
|
139
|
-
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
140
|
-
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
141
|
-
}
|
142
|
-
|
143
|
-
m.addSeparator();
|
144
|
-
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
145
|
-
|
146
|
-
m.addSeparator();
|
147
|
-
am = m.addMenu({title : 'contextmenu.align'});
|
148
|
-
am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
|
149
|
-
am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
|
150
|
-
am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
|
151
|
-
am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
|
152
|
-
|
153
|
-
t.onContextMenu.dispatch(t, m, el, col);
|
154
|
-
|
155
|
-
return m;
|
156
|
-
}
|
157
|
-
});
|
158
|
-
|
159
|
-
// Register plugin
|
160
|
-
tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
|
161
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
|