fit-ui 2.5.7 → 2.6.0
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.
- package/dist/Documentation.html +3 -3
- package/dist/Fit.UI.css +102 -6
- package/dist/Fit.UI.js +741 -109
- package/dist/Fit.UI.min.css +1 -1
- package/dist/Fit.UI.min.js +1 -1
- package/dist/Resources/CKEditor/build-config.js +7 -3
- package/dist/Resources/CKEditor/ckeditor.js +93 -5
- package/dist/Resources/CKEditor/lang/da.js +2 -2
- package/dist/Resources/CKEditor/lang/de.js +2 -2
- package/dist/Resources/CKEditor/lang/en.js +2 -2
- package/dist/Resources/CKEditor/plugins/autocomplete/skins/default.css +38 -0
- package/dist/Resources/CKEditor/plugins/emoji/assets/iconsall.png +0 -0
- package/dist/Resources/CKEditor/plugins/emoji/assets/iconsall.svg +58 -0
- package/dist/Resources/CKEditor/plugins/emoji/emoji.json +1 -0
- package/dist/Resources/CKEditor/plugins/emoji/skins/default.css +237 -0
- package/dist/Resources/CKEditor/plugins/icons.png +0 -0
- package/dist/Resources/CKEditor/plugins/icons_hidpi.png +0 -0
- package/dist/Resources/CKEditor/skins/moono-lisa/editor.css +5 -5
- package/dist/Resources/CKEditor/skins/moono-lisa/editor_gecko.css +5 -5
- package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie.css +5 -5
- package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie8.css +5 -5
- package/dist/Resources/CKEditor/skins/moono-lisa/editor_iequirks.css +5 -5
- package/dist/Resources/CKEditor/skins/moono-lisa/icons.png +0 -0
- package/dist/Resources/CKEditor/skins/moono-lisa/icons_hidpi.png +0 -0
- package/package.json +1 -1
- package/types/index.d.ts +497 -136
- package/dist/Resources/CKEditor/plugins/htmlwriter/plugin.js +0 -364
- package/dist/Resources/CKEditor/plugins/resize/plugin.js +0 -187
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
CKEDITOR.plugins.add( 'htmlwriter', {
|
|
7
|
-
init: function( editor ) {
|
|
8
|
-
var writer = new CKEDITOR.htmlWriter();
|
|
9
|
-
|
|
10
|
-
writer.forceSimpleAmpersand = editor.config.forceSimpleAmpersand;
|
|
11
|
-
writer.indentationChars = typeof editor.config.dataIndentationChars === 'string' ? editor.config.dataIndentationChars : '\t';
|
|
12
|
-
|
|
13
|
-
// Overwrite default basicWriter initialized in hmtlDataProcessor constructor.
|
|
14
|
-
editor.dataProcessor.writer = writer;
|
|
15
|
-
}
|
|
16
|
-
} );
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The class used to write HTML data.
|
|
20
|
-
*
|
|
21
|
-
* var writer = new CKEDITOR.htmlWriter();
|
|
22
|
-
* writer.openTag( 'p' );
|
|
23
|
-
* writer.attribute( 'class', 'MyClass' );
|
|
24
|
-
* writer.openTagClose( 'p' );
|
|
25
|
-
* writer.text( 'Hello' );
|
|
26
|
-
* writer.closeTag( 'p' );
|
|
27
|
-
* alert( writer.getHtml() ); // '<p class="MyClass">Hello</p>'
|
|
28
|
-
*
|
|
29
|
-
* @class
|
|
30
|
-
* @extends CKEDITOR.htmlParser.basicWriter
|
|
31
|
-
*/
|
|
32
|
-
CKEDITOR.htmlWriter = CKEDITOR.tools.createClass( {
|
|
33
|
-
base: CKEDITOR.htmlParser.basicWriter,
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Creates an `htmlWriter` class instance.
|
|
37
|
-
*
|
|
38
|
-
* @constructor
|
|
39
|
-
*/
|
|
40
|
-
$: function() {
|
|
41
|
-
// Call the base contructor.
|
|
42
|
-
this.base();
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The characters to be used for each indentation step.
|
|
46
|
-
*
|
|
47
|
-
* // Use tab for indentation.
|
|
48
|
-
* editorInstance.dataProcessor.writer.indentationChars = '\t';
|
|
49
|
-
*/
|
|
50
|
-
this.indentationChars = '\t';
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* The characters to be used to close "self-closing" elements, like `<br>` or `<img>`.
|
|
54
|
-
*
|
|
55
|
-
* // Use HTML4 notation for self-closing elements.
|
|
56
|
-
* editorInstance.dataProcessor.writer.selfClosingEnd = '>';
|
|
57
|
-
*/
|
|
58
|
-
this.selfClosingEnd = ' />';
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* The characters to be used for line breaks.
|
|
62
|
-
*
|
|
63
|
-
* // Use CRLF for line breaks.
|
|
64
|
-
* editorInstance.dataProcessor.writer.lineBreakChars = '\r\n';
|
|
65
|
-
*/
|
|
66
|
-
this.lineBreakChars = '\n';
|
|
67
|
-
|
|
68
|
-
this.sortAttributes = 1;
|
|
69
|
-
|
|
70
|
-
this._.indent = 0;
|
|
71
|
-
this._.indentation = '';
|
|
72
|
-
// Indicate preformatted block context status. (https://dev.ckeditor.com/ticket/5789)
|
|
73
|
-
this._.inPre = 0;
|
|
74
|
-
this._.rules = {};
|
|
75
|
-
|
|
76
|
-
var dtd = CKEDITOR.dtd;
|
|
77
|
-
|
|
78
|
-
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
|
|
79
|
-
this.setRules( e, {
|
|
80
|
-
indent: !dtd[ e ][ '#' ],
|
|
81
|
-
breakBeforeOpen: 1,
|
|
82
|
-
breakBeforeClose: !dtd[ e ][ '#' ],
|
|
83
|
-
breakAfterClose: 1,
|
|
84
|
-
needsSpace: ( e in dtd.$block ) && !( e in { li: 1, dt: 1, dd: 1 } )
|
|
85
|
-
} );
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
this.setRules( 'br', { breakAfterOpen: 1 } );
|
|
89
|
-
|
|
90
|
-
this.setRules( 'title', {
|
|
91
|
-
indent: 0,
|
|
92
|
-
breakAfterOpen: 0
|
|
93
|
-
} );
|
|
94
|
-
|
|
95
|
-
this.setRules( 'style', {
|
|
96
|
-
indent: 0,
|
|
97
|
-
breakBeforeClose: 1
|
|
98
|
-
} );
|
|
99
|
-
|
|
100
|
-
this.setRules( 'pre', {
|
|
101
|
-
breakAfterOpen: 1, // Keep line break after the opening tag
|
|
102
|
-
indent: 0 // Disable indentation on <pre>.
|
|
103
|
-
} );
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
proto: {
|
|
107
|
-
/**
|
|
108
|
-
* Writes the tag opening part for an opener tag.
|
|
109
|
-
*
|
|
110
|
-
* // Writes '<p'.
|
|
111
|
-
* writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } );
|
|
112
|
-
*
|
|
113
|
-
* @param {String} tagName The element name for this tag.
|
|
114
|
-
* @param {Object} attributes The attributes defined for this tag. The
|
|
115
|
-
* attributes could be used to inspect the tag.
|
|
116
|
-
*/
|
|
117
|
-
openTag: function( tagName ) {
|
|
118
|
-
var rules = this._.rules[ tagName ];
|
|
119
|
-
|
|
120
|
-
if ( this._.afterCloser && rules && rules.needsSpace && this._.needsSpace )
|
|
121
|
-
this._.output.push( '\n' );
|
|
122
|
-
|
|
123
|
-
if ( this._.indent )
|
|
124
|
-
this.indentation();
|
|
125
|
-
// Do not break if indenting.
|
|
126
|
-
else if ( rules && rules.breakBeforeOpen ) {
|
|
127
|
-
this.lineBreak();
|
|
128
|
-
this.indentation();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
this._.output.push( '<', tagName );
|
|
132
|
-
|
|
133
|
-
this._.afterCloser = 0;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Writes the tag closing part for an opener tag.
|
|
138
|
-
*
|
|
139
|
-
* // Writes '>'.
|
|
140
|
-
* writer.openTagClose( 'p', false );
|
|
141
|
-
*
|
|
142
|
-
* // Writes ' />'.
|
|
143
|
-
* writer.openTagClose( 'br', true );
|
|
144
|
-
*
|
|
145
|
-
* @param {String} tagName The element name for this tag.
|
|
146
|
-
* @param {Boolean} isSelfClose Indicates that this is a self-closing tag,
|
|
147
|
-
* like `<br>` or `<img>`.
|
|
148
|
-
*/
|
|
149
|
-
openTagClose: function( tagName, isSelfClose ) {
|
|
150
|
-
var rules = this._.rules[ tagName ];
|
|
151
|
-
|
|
152
|
-
if ( isSelfClose ) {
|
|
153
|
-
this._.output.push( this.selfClosingEnd );
|
|
154
|
-
|
|
155
|
-
if ( rules && rules.breakAfterClose )
|
|
156
|
-
this._.needsSpace = rules.needsSpace;
|
|
157
|
-
} else {
|
|
158
|
-
this._.output.push( '>' );
|
|
159
|
-
|
|
160
|
-
if ( rules && rules.indent )
|
|
161
|
-
this._.indentation += this.indentationChars;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if ( rules && rules.breakAfterOpen )
|
|
165
|
-
this.lineBreak();
|
|
166
|
-
tagName == 'pre' && ( this._.inPre = 1 );
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Writes an attribute. This function should be called after opening the
|
|
171
|
-
* tag with {@link #openTagClose}.
|
|
172
|
-
*
|
|
173
|
-
* // Writes ' class="MyClass"'.
|
|
174
|
-
* writer.attribute( 'class', 'MyClass' );
|
|
175
|
-
*
|
|
176
|
-
* @param {String} attName The attribute name.
|
|
177
|
-
* @param {String} attValue The attribute value.
|
|
178
|
-
*/
|
|
179
|
-
attribute: function( attName, attValue ) {
|
|
180
|
-
|
|
181
|
-
if ( typeof attValue == 'string' ) {
|
|
182
|
-
// Browsers don't always escape special character in attribute values. (https://dev.ckeditor.com/ticket/4683, https://dev.ckeditor.com/ticket/4719).
|
|
183
|
-
attValue = CKEDITOR.tools.htmlEncodeAttr( attValue );
|
|
184
|
-
|
|
185
|
-
// Run ampersand replacement after the htmlEncodeAttr, otherwise the results are overwritten (#965).
|
|
186
|
-
if ( this.forceSimpleAmpersand ) {
|
|
187
|
-
attValue = attValue.replace( /&/g, '&' );
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
this._.output.push( ' ', attName, '="', attValue, '"' );
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Writes a closer tag.
|
|
196
|
-
*
|
|
197
|
-
* // Writes '</p>'.
|
|
198
|
-
* writer.closeTag( 'p' );
|
|
199
|
-
*
|
|
200
|
-
* @param {String} tagName The element name for this tag.
|
|
201
|
-
*/
|
|
202
|
-
closeTag: function( tagName ) {
|
|
203
|
-
var rules = this._.rules[ tagName ];
|
|
204
|
-
|
|
205
|
-
if ( rules && rules.indent )
|
|
206
|
-
this._.indentation = this._.indentation.substr( this.indentationChars.length );
|
|
207
|
-
|
|
208
|
-
if ( this._.indent )
|
|
209
|
-
this.indentation();
|
|
210
|
-
// Do not break if indenting.
|
|
211
|
-
else if ( rules && rules.breakBeforeClose ) {
|
|
212
|
-
this.lineBreak();
|
|
213
|
-
this.indentation();
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
this._.output.push( '</', tagName, '>' );
|
|
217
|
-
tagName == 'pre' && ( this._.inPre = 0 );
|
|
218
|
-
|
|
219
|
-
if ( rules && rules.breakAfterClose ) {
|
|
220
|
-
this.lineBreak();
|
|
221
|
-
this._.needsSpace = rules.needsSpace;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
this._.afterCloser = 1;
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Writes text.
|
|
229
|
-
*
|
|
230
|
-
* // Writes 'Hello Word'.
|
|
231
|
-
* writer.text( 'Hello Word' );
|
|
232
|
-
*
|
|
233
|
-
* @param {String} text The text value
|
|
234
|
-
*/
|
|
235
|
-
text: function( text ) {
|
|
236
|
-
if ( this._.indent ) {
|
|
237
|
-
this.indentation();
|
|
238
|
-
!this._.inPre && ( text = CKEDITOR.tools.ltrim( text ) );
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
this._.output.push( text );
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Writes a comment.
|
|
246
|
-
*
|
|
247
|
-
* // Writes "<!-- My comment -->".
|
|
248
|
-
* writer.comment( ' My comment ' );
|
|
249
|
-
*
|
|
250
|
-
* @param {String} comment The comment text.
|
|
251
|
-
*/
|
|
252
|
-
comment: function( comment ) {
|
|
253
|
-
if ( this._.indent )
|
|
254
|
-
this.indentation();
|
|
255
|
-
|
|
256
|
-
this._.output.push( '<!--', comment, '-->' );
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Writes a line break. It uses the {@link #lineBreakChars} property for it.
|
|
261
|
-
*
|
|
262
|
-
* // Writes '\n' (e.g.).
|
|
263
|
-
* writer.lineBreak();
|
|
264
|
-
*/
|
|
265
|
-
lineBreak: function() {
|
|
266
|
-
if ( !this._.inPre && this._.output.length > 0 )
|
|
267
|
-
this._.output.push( this.lineBreakChars );
|
|
268
|
-
this._.indent = 1;
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Writes the current indentation character. It uses the {@link #indentationChars}
|
|
273
|
-
* property, repeating it for the current indentation steps.
|
|
274
|
-
*
|
|
275
|
-
* // Writes '\t' (e.g.).
|
|
276
|
-
* writer.indentation();
|
|
277
|
-
*/
|
|
278
|
-
indentation: function() {
|
|
279
|
-
if ( !this._.inPre && this._.indentation )
|
|
280
|
-
this._.output.push( this._.indentation );
|
|
281
|
-
this._.indent = 0;
|
|
282
|
-
},
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Empties the current output buffer. It also brings back the default
|
|
286
|
-
* values of the writer flags.
|
|
287
|
-
*
|
|
288
|
-
* writer.reset();
|
|
289
|
-
*/
|
|
290
|
-
reset: function() {
|
|
291
|
-
this._.output = [];
|
|
292
|
-
this._.indent = 0;
|
|
293
|
-
this._.indentation = '';
|
|
294
|
-
this._.afterCloser = 0;
|
|
295
|
-
this._.inPre = 0;
|
|
296
|
-
this._.needsSpace = 0;
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Sets formatting rules for a given element. Possible rules are:
|
|
301
|
-
*
|
|
302
|
-
* * `indent` – indent the element content.
|
|
303
|
-
* * `breakBeforeOpen` – break line before the opener tag for this element.
|
|
304
|
-
* * `breakAfterOpen` – break line after the opener tag for this element.
|
|
305
|
-
* * `breakBeforeClose` – break line before the closer tag for this element.
|
|
306
|
-
* * `breakAfterClose` – break line after the closer tag for this element.
|
|
307
|
-
*
|
|
308
|
-
* All rules default to `false`. Each function call overrides rules that are
|
|
309
|
-
* already present, leaving the undefined ones untouched.
|
|
310
|
-
*
|
|
311
|
-
* By default, all elements available in the {@link CKEDITOR.dtd#$block},
|
|
312
|
-
* {@link CKEDITOR.dtd#$listItem}, and {@link CKEDITOR.dtd#$tableContent}
|
|
313
|
-
* lists have all the above rules set to `true`. Additionaly, the `<br>`
|
|
314
|
-
* element has the `breakAfterOpen` rule set to `true`.
|
|
315
|
-
*
|
|
316
|
-
* // Break line before and after "img" tags.
|
|
317
|
-
* writer.setRules( 'img', {
|
|
318
|
-
* breakBeforeOpen: true
|
|
319
|
-
* breakAfterOpen: true
|
|
320
|
-
* } );
|
|
321
|
-
*
|
|
322
|
-
* // Reset the rules for the "h1" tag.
|
|
323
|
-
* writer.setRules( 'h1', {} );
|
|
324
|
-
*
|
|
325
|
-
* @param {String} tagName The name of the element for which the rules are set.
|
|
326
|
-
* @param {Object} rules An object containing the element rules.
|
|
327
|
-
*/
|
|
328
|
-
setRules: function( tagName, rules ) {
|
|
329
|
-
var currentRules = this._.rules[ tagName ];
|
|
330
|
-
|
|
331
|
-
if ( currentRules )
|
|
332
|
-
CKEDITOR.tools.extend( currentRules, rules, true );
|
|
333
|
-
else
|
|
334
|
-
this._.rules[ tagName ] = rules;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
} );
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Whether to force using `'&'` instead of `'&'` in element attributes
|
|
341
|
-
* values. It is not recommended to change this setting for compliance with the
|
|
342
|
-
* W3C XHTML 1.0 standards ([C.12, XHTML 1.0](http://www.w3.org/TR/xhtml1/#C_12)).
|
|
343
|
-
*
|
|
344
|
-
* // Use `'&'` instead of `'&'`
|
|
345
|
-
* CKEDITOR.config.forceSimpleAmpersand = true;
|
|
346
|
-
*
|
|
347
|
-
* @cfg {Boolean} [forceSimpleAmpersand=false]
|
|
348
|
-
* @member CKEDITOR.config
|
|
349
|
-
*/
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* The characters to be used for indenting HTML output produced by the editor.
|
|
353
|
-
* Using characters different from `' '` (space) and `'\t'` (tab) is not recommended
|
|
354
|
-
* as it will mess the code.
|
|
355
|
-
*
|
|
356
|
-
* // No indentation.
|
|
357
|
-
* CKEDITOR.config.dataIndentationChars = '';
|
|
358
|
-
*
|
|
359
|
-
* // Use two spaces for indentation.
|
|
360
|
-
* CKEDITOR.config.dataIndentationChars = ' ';
|
|
361
|
-
*
|
|
362
|
-
* @cfg {String} [dataIndentationChars='\t']
|
|
363
|
-
* @member CKEDITOR.config
|
|
364
|
-
*/
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
CKEDITOR.plugins.add( 'resize', {
|
|
7
|
-
init: function( editor ) {
|
|
8
|
-
function dragHandler( evt ) {
|
|
9
|
-
var dx = evt.data.$.screenX - origin.x,
|
|
10
|
-
dy = evt.data.$.screenY - origin.y,
|
|
11
|
-
width = startSize.width,
|
|
12
|
-
height = startSize.height,
|
|
13
|
-
internalWidth = width + dx * ( resizeDir == 'rtl' ? -1 : 1 ),
|
|
14
|
-
internalHeight = height + dy;
|
|
15
|
-
|
|
16
|
-
if ( resizeHorizontal )
|
|
17
|
-
width = Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) );
|
|
18
|
-
|
|
19
|
-
if ( resizeVertical )
|
|
20
|
-
height = Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) );
|
|
21
|
-
|
|
22
|
-
// DO NOT impose fixed size with single direction resize. (https://dev.ckeditor.com/ticket/6308)
|
|
23
|
-
editor.resize( resizeHorizontal ? width : null, height );
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function dragEndHandler() {
|
|
27
|
-
CKEDITOR.document.removeListener( 'mousemove', dragHandler );
|
|
28
|
-
CKEDITOR.document.removeListener( 'mouseup', dragEndHandler );
|
|
29
|
-
|
|
30
|
-
if ( editor.document ) {
|
|
31
|
-
editor.document.removeListener( 'mousemove', dragHandler );
|
|
32
|
-
editor.document.removeListener( 'mouseup', dragEndHandler );
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var config = editor.config;
|
|
37
|
-
var spaceId = editor.ui.spaceId( 'resizer' );
|
|
38
|
-
|
|
39
|
-
// Resize in the same direction of chrome,
|
|
40
|
-
// which is identical to dir of editor element. (https://dev.ckeditor.com/ticket/6614)
|
|
41
|
-
var resizeDir = editor.element ? editor.element.getDirection( 1 ) : 'ltr';
|
|
42
|
-
|
|
43
|
-
!config.resize_dir && ( config.resize_dir = 'vertical' );
|
|
44
|
-
( config.resize_maxWidth === undefined ) && ( config.resize_maxWidth = 3000 );
|
|
45
|
-
( config.resize_maxHeight === undefined ) && ( config.resize_maxHeight = 3000 );
|
|
46
|
-
( config.resize_minWidth === undefined ) && ( config.resize_minWidth = 750 );
|
|
47
|
-
( config.resize_minHeight === undefined ) && ( config.resize_minHeight = 250 );
|
|
48
|
-
|
|
49
|
-
if ( config.resize_enabled !== false ) {
|
|
50
|
-
var container = null,
|
|
51
|
-
origin, startSize,
|
|
52
|
-
resizeHorizontal = ( config.resize_dir == 'both' || config.resize_dir == 'horizontal' ) && ( config.resize_minWidth != config.resize_maxWidth ),
|
|
53
|
-
resizeVertical = ( config.resize_dir == 'both' || config.resize_dir == 'vertical' ) && ( config.resize_minHeight != config.resize_maxHeight );
|
|
54
|
-
|
|
55
|
-
var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) {
|
|
56
|
-
if ( !container )
|
|
57
|
-
container = editor.getResizable();
|
|
58
|
-
|
|
59
|
-
startSize = { width: container.$.offsetWidth || 0, height: container.$.offsetHeight || 0 };
|
|
60
|
-
origin = { x: $event.screenX, y: $event.screenY };
|
|
61
|
-
|
|
62
|
-
config.resize_minWidth > startSize.width && ( config.resize_minWidth = startSize.width );
|
|
63
|
-
config.resize_minHeight > startSize.height && ( config.resize_minHeight = startSize.height );
|
|
64
|
-
|
|
65
|
-
CKEDITOR.document.on( 'mousemove', dragHandler );
|
|
66
|
-
CKEDITOR.document.on( 'mouseup', dragEndHandler );
|
|
67
|
-
|
|
68
|
-
if ( editor.document ) {
|
|
69
|
-
editor.document.on( 'mousemove', dragHandler );
|
|
70
|
-
editor.document.on( 'mouseup', dragEndHandler );
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
$event.preventDefault && $event.preventDefault();
|
|
74
|
-
} );
|
|
75
|
-
|
|
76
|
-
editor.on( 'destroy', function() {
|
|
77
|
-
CKEDITOR.tools.removeFunction( mouseDownFn );
|
|
78
|
-
} );
|
|
79
|
-
|
|
80
|
-
editor.on( 'uiSpace', function( event ) {
|
|
81
|
-
if ( event.data.space == 'bottom' ) {
|
|
82
|
-
var direction = '';
|
|
83
|
-
if ( resizeHorizontal && !resizeVertical )
|
|
84
|
-
direction = ' cke_resizer_horizontal';
|
|
85
|
-
if ( !resizeHorizontal && resizeVertical )
|
|
86
|
-
direction = ' cke_resizer_vertical';
|
|
87
|
-
|
|
88
|
-
var resizerHtml =
|
|
89
|
-
'<span' +
|
|
90
|
-
' id="' + spaceId + '"' +
|
|
91
|
-
' class="cke_resizer' + direction + ' cke_resizer_' + resizeDir + '"' +
|
|
92
|
-
' title="' + CKEDITOR.tools.htmlEncode( editor.lang.common.resize ) + '"' +
|
|
93
|
-
' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' +
|
|
94
|
-
'>' +
|
|
95
|
-
// BLACK LOWER RIGHT TRIANGLE (ltr)
|
|
96
|
-
// BLACK LOWER LEFT TRIANGLE (rtl)
|
|
97
|
-
( resizeDir == 'ltr' ? '\u25E2' : '\u25E3' ) +
|
|
98
|
-
'</span>';
|
|
99
|
-
|
|
100
|
-
// Always sticks the corner of botttom space.
|
|
101
|
-
resizeDir == 'ltr' && direction == 'ltr' ? event.data.html += resizerHtml : event.data.html = resizerHtml + event.data.html;
|
|
102
|
-
}
|
|
103
|
-
}, editor, null, 100 );
|
|
104
|
-
|
|
105
|
-
// Toggle the visibility of the resizer when an editor is being maximized or minimized.
|
|
106
|
-
editor.on( 'maximize', function( event ) {
|
|
107
|
-
editor.ui.space( 'resizer' )[ event.data == CKEDITOR.TRISTATE_ON ? 'hide' : 'show' ]();
|
|
108
|
-
} );
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
} );
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The minimum editor width, in pixels, when resizing the editor interface by using the resize handle.
|
|
115
|
-
* Note: It falls back to editor's actual width if it is smaller than the default value.
|
|
116
|
-
*
|
|
117
|
-
* Read more in the {@glink features/resize documentation}
|
|
118
|
-
* and see the {@glink examples/resize example}.
|
|
119
|
-
*
|
|
120
|
-
* config.resize_minWidth = 500;
|
|
121
|
-
*
|
|
122
|
-
* @cfg {Number} [resize_minWidth=750]
|
|
123
|
-
* @member CKEDITOR.config
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* The minimum editor height, in pixels, when resizing the editor interface by using the resize handle.
|
|
128
|
-
* Note: It falls back to editor's actual height if it is smaller than the default value.
|
|
129
|
-
*
|
|
130
|
-
* Read more in the {@glink features/resize documentation}
|
|
131
|
-
* and see the {@glink examples/resize example}.
|
|
132
|
-
*
|
|
133
|
-
* config.resize_minHeight = 600;
|
|
134
|
-
*
|
|
135
|
-
* @cfg {Number} [resize_minHeight=250]
|
|
136
|
-
* @member CKEDITOR.config
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The maximum editor width, in pixels, when resizing the editor interface by using the resize handle.
|
|
141
|
-
*
|
|
142
|
-
* Read more in the {@glink features/resize documentation}
|
|
143
|
-
* and see the {@glink examples/resize example}.
|
|
144
|
-
*
|
|
145
|
-
* config.resize_maxWidth = 750;
|
|
146
|
-
*
|
|
147
|
-
* @cfg {Number} [resize_maxWidth=3000]
|
|
148
|
-
* @member CKEDITOR.config
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* The maximum editor height, in pixels, when resizing the editor interface by using the resize handle.
|
|
153
|
-
*
|
|
154
|
-
* Read more in the {@glink features/resize documentation}
|
|
155
|
-
* and see the {@glink examples/resize example}.
|
|
156
|
-
*
|
|
157
|
-
* config.resize_maxHeight = 600;
|
|
158
|
-
*
|
|
159
|
-
* @cfg {Number} [resize_maxHeight=3000]
|
|
160
|
-
* @member CKEDITOR.config
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Whether to enable the resizing feature. If this feature is disabled, the resize handle will not be visible.
|
|
165
|
-
*
|
|
166
|
-
* Read more in the {@glink features/resize documentation}
|
|
167
|
-
* and see the {@glink examples/resize example}.
|
|
168
|
-
*
|
|
169
|
-
* config.resize_enabled = false;
|
|
170
|
-
*
|
|
171
|
-
* @cfg {Boolean} [resize_enabled=true]
|
|
172
|
-
* @member CKEDITOR.config
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The dimensions for which the editor resizing is enabled. Possible values
|
|
177
|
-
* are `both`, `vertical`, and `horizontal`.
|
|
178
|
-
*
|
|
179
|
-
* Read more in the {@glink features/resize documentation}
|
|
180
|
-
* and see the {@glink examples/resize example}.
|
|
181
|
-
*
|
|
182
|
-
* config.resize_dir = 'both';
|
|
183
|
-
*
|
|
184
|
-
* @since 3.3.0
|
|
185
|
-
* @cfg {String} [resize_dir='vertical']
|
|
186
|
-
* @member CKEDITOR.config
|
|
187
|
-
*/
|