jodit 3.13.4 → 3.14.2
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/.idea/workspace.xml +170 -158
- package/CHANGELOG.MD +50 -5
- package/README.md +2 -2
- package/build/jodit.css +25 -18
- package/build/jodit.es2018.css +18 -14
- package/build/jodit.es2018.en.css +18 -14
- package/build/jodit.es2018.en.js +9160 -7960
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +9149 -7944
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +19550 -19348
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/build/vdom.css +3012 -0
- package/build/vdom.es2018.css +3012 -0
- package/build/vdom.es2018.en.css +3012 -0
- package/build/vdom.es2018.en.js +14153 -0
- package/build/vdom.es2018.en.min.css +1 -0
- package/build/vdom.es2018.en.min.js +1 -0
- package/build/vdom.es2018.js +14153 -0
- package/build/vdom.es2018.min.css +1 -0
- package/build/vdom.es2018.min.js +1 -0
- package/build/vdom.js +17419 -0
- package/build/vdom.min.css +1 -0
- package/build/vdom.min.js +1 -0
- package/package.json +16 -16
- package/src/README.md +8 -7
- package/src/config.ts +17 -25
- package/src/core/component/README.md +41 -40
- package/src/core/create/README.md +2 -2
- package/src/core/decorators/cache/README.md +4 -4
- package/src/core/decorators/component/README.md +12 -11
- package/src/core/decorators/watch/README.md +22 -16
- package/src/core/dom/README.md +1 -1
- package/src/core/dom/dom.ts +1 -1
- package/src/core/event-emitter/README.md +13 -13
- package/src/core/helpers/README.md +16 -13
- package/src/core/helpers/utils/get.ts +9 -5
- package/src/core/plugin/README.md +2 -2
- package/src/core/plugin/plugin-system.ts +6 -0
- package/src/core/request/README.md +1 -1
- package/src/core/selection/README.md +4 -4
- package/src/core/ui/README.md +13 -12
- package/src/core/ui/button/button/button.less +2 -0
- package/src/core/vdom/README.md +1 -0
- package/src/core/vdom/helpers/index.ts +58 -0
- package/src/core/vdom/index.ts +14 -0
- package/src/core/vdom/interface.ts +61 -0
- package/src/core/vdom/render/index.ts +235 -0
- package/src/jodit.ts +2 -2
- package/src/langs/de.js +7 -2
- package/src/modules/dialog/README.md +18 -16
- package/src/modules/dialog/dialog.less +8 -4
- package/src/modules/dialog/dialog.ts +20 -8
- package/src/modules/image-editor/README.md +12 -0
- package/src/modules/image-editor/config.ts +30 -0
- package/src/modules/image-editor/image-editor.ts +34 -48
- package/src/modules/uploader/uploader.less +1 -1
- package/src/plugins/README.md +0 -2
- package/src/plugins/clipboard/config.ts +1 -1
- package/src/plugins/clipboard/drag-and-drop-element.ts +48 -20
- package/src/plugins/clipboard/paste/CHANGELOG.md +8 -8
- package/src/plugins/clipboard/paste/README.md +3 -2
- package/src/plugins/format-block/CHANGELOG.md +8 -8
- package/src/plugins/format-block/README.md +10 -10
- package/src/plugins/iframe/config.ts +169 -0
- package/src/plugins/iframe/iframe.ts +1 -145
- package/src/plugins/image/image-processor.ts +12 -16
- package/src/plugins/image/image-properties/config.ts +109 -0
- package/src/plugins/image/image-properties/image-properties.ts +2 -99
- package/src/plugins/inline-popup/inline-popup.ts +10 -8
- package/src/plugins/keyboard/tab/tab.ts +1 -1
- package/src/plugins/line-height/README.md +7 -7
- package/src/plugins/line-height/line-height.ts +1 -1
- package/src/plugins/mobile/config.ts +89 -0
- package/src/plugins/mobile/mobile.ts +11 -85
- package/src/plugins/print/helpers.ts +172 -0
- package/src/plugins/print/preview.ts +6 -94
- package/src/plugins/resizer/config.ts +54 -0
- package/src/plugins/resizer/resizer.less +4 -4
- package/src/plugins/resizer/resizer.ts +7 -50
- package/src/plugins/source/README.md +21 -23
- package/src/plugins/table/select-cells.ts +1 -1
- package/src/styles/icons/README.md +19 -13
- package/src/styles/jodit.less +4 -0
- package/src/types/events.d.ts +1 -4
- package/src/types/jodit.d.ts +1 -4
- package/src/types/observer.d.ts +6 -1
- package/src/types/ui.d.ts +7 -3
- package/src/types/uploader.d.ts +1 -1
- package/src/types/view.d.ts +13 -13
- package/tsdoc.json +5 -0
- package/types/config.d.ts +0 -13
- package/types/core/dom/dom.d.ts +1 -1
- package/types/modules/image-editor/config.d.ts +11 -0
- package/types/modules/image-editor/image-editor.d.ts +25 -20
- package/types/plugins/clipboard/drag-and-drop-element.d.ts +1 -1
- package/types/plugins/iframe/config.d.ts +82 -0
- package/types/plugins/iframe/iframe.d.ts +1 -11
- package/types/plugins/image/image-properties/config.d.ts +70 -0
- package/types/plugins/image/image-properties/image-properties.d.ts +1 -77
- package/types/plugins/inline-popup/inline-popup.d.ts +1 -0
- package/types/plugins/keyboard/tab/tab.d.ts +1 -1
- package/types/plugins/mobile/config.d.ts +18 -0
- package/types/plugins/mobile/mobile.d.ts +1 -12
- package/types/plugins/print/helpers.d.ts +16 -0
- package/types/plugins/resizer/config.d.ts +36 -0
- package/types/plugins/resizer/resizer.d.ts +1 -31
- package/types/types/events.d.ts +1 -4
- package/types/types/jodit.d.ts +1 -4
- package/types/types/observer.d.ts +6 -1
- package/types/types/ui.d.ts +7 -3
- package/types/types/uploader.d.ts +1 -1
- package/types/types/view.d.ts +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
The plugin allows you to add the ability to directly edit HTML to the editor.
|
|
2
|
-
The plugin connects the editor to the [Ace](https://ace.c9.io/)
|
|
2
|
+
The plugin connects the editor to the [Ace](https://ace.c9.io/) page (default behavior).
|
|
3
3
|
This is implemented through the connection of the CDN JS file. They are set in the settings in [[Config.sourceEditorCDNUrlsJS]]
|
|
4
4
|
The appearance of the Ace editor can be set through its settings, option [[Config.sourceEditorNativeOptions]]
|
|
5
5
|
|
|
@@ -7,10 +7,10 @@ For example, let's change the editor theme to light `Chrome`
|
|
|
7
7
|
|
|
8
8
|
```js
|
|
9
9
|
Jodit.make('#editor', {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
10
|
+
sourceEditorNativeOptions: {
|
|
11
|
+
theme: 'chrome'
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
The list of themes supported by `Ace` can be found on this page https://ace.c9.io/build/kitchen-sink.html
|
|
@@ -19,8 +19,8 @@ Also, you can not use `Ace` but just use `Textarea`
|
|
|
19
19
|
|
|
20
20
|
```js
|
|
21
21
|
Jodit.make('#editor', {
|
|
22
|
-
|
|
23
|
-
})
|
|
22
|
+
sourceEditor: 'area'
|
|
23
|
+
});
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
## Custom editor
|
|
@@ -30,31 +30,29 @@ To do this, you need to add a class that will implement the interface [[ISourceE
|
|
|
30
30
|
|
|
31
31
|
```js
|
|
32
32
|
class MirrorEditor {
|
|
33
|
-
constructor(jodit){}
|
|
33
|
+
constructor(jodit) {}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
getValue() {}
|
|
36
|
+
setValue(raw) {}
|
|
37
|
+
insertRaw(raw) {}
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
getSelectionEnd() {}
|
|
40
|
+
getSelectionStart() {}
|
|
41
|
+
setSelectionRange(start, end) {}
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
setPlaceHolder(title) {}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
}
|
|
45
|
+
focus() {}
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
setReadOnly(isReadOnly) {}
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
selectAll() {}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
get isReady() {}
|
|
52
|
+
onReadyAlways(callback) {}
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
Jodit.make('#editor', {
|
|
57
|
-
|
|
56
|
+
sourceEditor: j => new MirrorEditor(j)
|
|
58
57
|
});
|
|
59
58
|
```
|
|
60
|
-
|
|
@@ -6,19 +6,23 @@ console.log(Jodit.modules.Icon.get('cancel')); // <svg ...
|
|
|
6
6
|
```
|
|
7
7
|
|
|
8
8
|
You can add your own icons:
|
|
9
|
+
|
|
9
10
|
```js
|
|
10
|
-
Jodit.modules.Icon.set('someIcon', '<svg ....')
|
|
11
|
+
Jodit.modules.Icon.set('someIcon', '<svg ....');
|
|
11
12
|
```
|
|
12
13
|
|
|
13
14
|
And then use this icon for example in a button in the toolbar
|
|
15
|
+
|
|
14
16
|
```js
|
|
15
17
|
Jodit.make('#editor', {
|
|
16
|
-
buttons: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
18
|
+
buttons: [
|
|
19
|
+
{
|
|
20
|
+
icon: 'someIcon',
|
|
21
|
+
name: 'someButton',
|
|
22
|
+
exec: e => alert(e.selection.html)
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
});
|
|
22
26
|
```
|
|
23
27
|
|
|
24
28
|
The list of icons from the build can be viewed [here](https://github.com/xdan/jodit/tree/master/src/styles/icons)
|
|
@@ -27,12 +31,14 @@ In addition to the added icons in the toolbar, you can also use a simple link to
|
|
|
27
31
|
|
|
28
32
|
```js
|
|
29
33
|
Jodit.make('#editor', {
|
|
30
|
-
buttons: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
34
|
+
buttons: [
|
|
35
|
+
{
|
|
36
|
+
iconURL: 'https://xdsoft.net/jodit/build/images/logo.png',
|
|
37
|
+
name: 'someButton',
|
|
38
|
+
exec: e => alert(e.selection.html)
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
});
|
|
36
42
|
```
|
|
37
43
|
|
|
38
44
|
## Custom icons / Use Font awesome
|
package/src/styles/jodit.less
CHANGED
package/src/types/events.d.ts
CHANGED
|
@@ -130,10 +130,7 @@ interface IEventEmitter extends IDestructible {
|
|
|
130
130
|
* parent.e.off('someGlobalEvents');
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
|
-
off(
|
|
134
|
-
events: string,
|
|
135
|
-
eventsOrCallback?: CallbackFunction
|
|
136
|
-
): IEventEmitter;
|
|
133
|
+
off(events: string, eventsOrCallback?: CallbackFunction): IEventEmitter;
|
|
137
134
|
off(
|
|
138
135
|
subject: object,
|
|
139
136
|
events?: string,
|
package/src/types/jodit.d.ts
CHANGED
|
@@ -36,10 +36,7 @@ interface IJodit extends IViewWithToolbar {
|
|
|
36
36
|
element: HTMLElement;
|
|
37
37
|
|
|
38
38
|
getNativeEditorValue(): string;
|
|
39
|
-
getEditorValue(
|
|
40
|
-
removeSelectionMarkers?: boolean,
|
|
41
|
-
consumer?: string
|
|
42
|
-
): string;
|
|
39
|
+
getEditorValue(removeSelectionMarkers?: boolean, consumer?: string): string;
|
|
43
40
|
setEditorValue(value?: string): void;
|
|
44
41
|
|
|
45
42
|
getReadOnly(): boolean;
|
package/src/types/observer.d.ts
CHANGED
|
@@ -8,7 +8,12 @@
|
|
|
8
8
|
* @module types
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
CallbackFunction,
|
|
13
|
+
CanUndef,
|
|
14
|
+
IComponent,
|
|
15
|
+
SnapshotType
|
|
16
|
+
} from './types';
|
|
12
17
|
|
|
13
18
|
export interface IObservable {
|
|
14
19
|
on(event: string | string[], callback: CallbackFunction): this;
|
package/src/types/ui.d.ts
CHANGED
|
@@ -21,7 +21,12 @@ import type { IViewBased } from 'jodit/types/view';
|
|
|
21
21
|
import type { ButtonsOption } from 'jodit/types/toolbar';
|
|
22
22
|
import type { IElms, IMods } from 'jodit/types/traits';
|
|
23
23
|
|
|
24
|
-
export interface IUIElement
|
|
24
|
+
export interface IUIElement
|
|
25
|
+
extends IViewComponent,
|
|
26
|
+
IContainer,
|
|
27
|
+
IDestructible,
|
|
28
|
+
IMods,
|
|
29
|
+
IElms {
|
|
25
30
|
parentElement: Nullable<IUIElement>;
|
|
26
31
|
container: HTMLElement;
|
|
27
32
|
name: string;
|
|
@@ -132,7 +137,7 @@ export interface IUIInput extends IUIElement {
|
|
|
132
137
|
icon: string;
|
|
133
138
|
label: string;
|
|
134
139
|
ref: string;
|
|
135
|
-
type: 'text' | 'number' |'checkbox' | 'url' | 'file' | 'hidden';
|
|
140
|
+
type: 'text' | 'number' | 'checkbox' | 'url' | 'file' | 'hidden';
|
|
136
141
|
placeholder: string;
|
|
137
142
|
required: boolean;
|
|
138
143
|
validators: string[];
|
|
@@ -183,7 +188,6 @@ export interface IUIRange extends IUIInput {
|
|
|
183
188
|
};
|
|
184
189
|
}
|
|
185
190
|
|
|
186
|
-
|
|
187
191
|
export interface IUICheckBox extends IUIInput {
|
|
188
192
|
readonly state: IUIInput['state'] & {
|
|
189
193
|
checked: boolean;
|
package/src/types/uploader.d.ts
CHANGED
package/src/types/view.d.ts
CHANGED
|
@@ -33,22 +33,22 @@ interface ILanguageOptions {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface IToolbarOptions {
|
|
36
|
-
theme?: string;
|
|
37
36
|
toolbar?: boolean | string | HTMLElement;
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
readonly theme?: string;
|
|
38
|
+
readonly toolbarButtonSize?: IUIButtonState['size'];
|
|
39
|
+
readonly textIcons?: boolean | ((key: string) => boolean);
|
|
40
40
|
|
|
41
|
-
extraButtons?: Buttons;
|
|
42
|
-
removeButtons?: string[];
|
|
43
|
-
extraIcons?: IDictionary<string>;
|
|
41
|
+
readonly extraButtons?: Buttons;
|
|
42
|
+
readonly removeButtons?: string[];
|
|
43
|
+
readonly extraIcons?: IDictionary<string>;
|
|
44
44
|
|
|
45
|
-
buttons?: ButtonsOption;
|
|
45
|
+
readonly buttons?: ButtonsOption;
|
|
46
46
|
|
|
47
|
-
showTooltip?: boolean;
|
|
48
|
-
showTooltipDelay?: number;
|
|
49
|
-
useNativeTooltip?: boolean;
|
|
47
|
+
readonly showTooltip?: boolean;
|
|
48
|
+
readonly showTooltipDelay?: number;
|
|
49
|
+
readonly useNativeTooltip?: boolean;
|
|
50
50
|
|
|
51
|
-
direction?: string;
|
|
51
|
+
readonly direction?: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
type NodeFunction = (elm: HTMLElement) => void;
|
|
@@ -112,8 +112,8 @@ interface IViewBased<T = IViewOptions>
|
|
|
112
112
|
|
|
113
113
|
progressbar: IProgressBar;
|
|
114
114
|
|
|
115
|
-
events: IEventEmitter;
|
|
116
|
-
e: this['events'];
|
|
115
|
+
readonly events: IEventEmitter;
|
|
116
|
+
readonly e: this['events'];
|
|
117
117
|
|
|
118
118
|
readonly async: IAsync;
|
|
119
119
|
|
package/tsdoc.json
CHANGED
package/types/config.d.ts
CHANGED
|
@@ -28,19 +28,6 @@ export declare class Config implements IViewOptions {
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
safePluginsList: string[];
|
|
31
|
-
/**
|
|
32
|
-
* When this option is enabled, the editor's content will be placed in an iframe and isolated from the rest of the page.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```javascript
|
|
36
|
-
* new Jodit('#editor', {
|
|
37
|
-
* iframe = true;
|
|
38
|
-
* iframeStyle = 'html{margin: 0px;}body{padding:10px;background:transparent;color:#000;position:relative;z-index:2;\
|
|
39
|
-
* user-select:auto;margin:0px;overflow:hidden;}body:after{content:"";clear:both;display:block}';
|
|
40
|
-
* });
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
iframe: boolean;
|
|
44
31
|
commandToHotkeys: IDictionary<string | string[]>;
|
|
45
32
|
license: string;
|
|
46
33
|
preset: string;
|
package/types/core/dom/dom.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class Dom {
|
|
|
30
30
|
*/
|
|
31
31
|
static unwrap(node: Node): void;
|
|
32
32
|
/**
|
|
33
|
-
* Call
|
|
33
|
+
* Call functions for all nodes between `start` and `end`
|
|
34
34
|
*/
|
|
35
35
|
static between(start: Node, end: Node, callback: (node: Node) => void | boolean): void;
|
|
36
36
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { ImageEditorOptions } from 'jodit/types';
|
|
7
|
+
declare module 'jodit/config' {
|
|
8
|
+
interface Config {
|
|
9
|
+
imageeditor: ImageEditorOptions;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -12,10 +12,21 @@ import './image-editor.less';
|
|
|
12
12
|
import type { ImageEditorActionBox, ImageEditorOptions, IViewBased, IFileBrowserDataProvider } from 'jodit/types';
|
|
13
13
|
import { ViewComponent } from 'jodit/core/component';
|
|
14
14
|
import { Dialog } from 'jodit/modules/dialog';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
import './config';
|
|
16
|
+
interface onSave {
|
|
17
|
+
(
|
|
18
|
+
/**
|
|
19
|
+
* new filename
|
|
20
|
+
*/
|
|
21
|
+
newname: string | void, box: ImageEditorActionBox,
|
|
22
|
+
/**
|
|
23
|
+
* called after success operation
|
|
24
|
+
*/
|
|
25
|
+
success: () => void,
|
|
26
|
+
/**
|
|
27
|
+
* called after failed operation
|
|
28
|
+
*/
|
|
29
|
+
failed: (error: Error) => void): void;
|
|
19
30
|
}
|
|
20
31
|
/**
|
|
21
32
|
* The module allows you to edit the image: resize or cut any part of it
|
|
@@ -45,15 +56,15 @@ export declare class ImageEditor extends ViewComponent {
|
|
|
45
56
|
private new_w;
|
|
46
57
|
private diff_x;
|
|
47
58
|
private diff_y;
|
|
48
|
-
private buttons;
|
|
49
|
-
private editor;
|
|
50
|
-
private resize_box;
|
|
51
|
-
private crop_box;
|
|
59
|
+
private readonly buttons;
|
|
60
|
+
private readonly editor;
|
|
61
|
+
private readonly resize_box;
|
|
62
|
+
private readonly crop_box;
|
|
52
63
|
private sizes;
|
|
53
|
-
private resizeHandler;
|
|
54
|
-
private cropHandler;
|
|
55
|
-
private cropBox;
|
|
56
|
-
private resizeBox;
|
|
64
|
+
private readonly resizeHandler;
|
|
65
|
+
private readonly cropHandler;
|
|
66
|
+
private readonly cropBox;
|
|
67
|
+
private readonly resizeBox;
|
|
57
68
|
private static calcValueByPercent;
|
|
58
69
|
private calcCropBox;
|
|
59
70
|
private showCrop;
|
|
@@ -74,13 +85,6 @@ export declare class ImageEditor extends ViewComponent {
|
|
|
74
85
|
hide(): void;
|
|
75
86
|
/**
|
|
76
87
|
* Open image editor
|
|
77
|
-
*
|
|
78
|
-
* @param [save.name] - new filename
|
|
79
|
-
* @param save.data - Bound box for resize and crop operation
|
|
80
|
-
* @param save.data.action - resize or crop
|
|
81
|
-
* @param save.data.box - Bound box
|
|
82
|
-
* @param save.success - called after success operation
|
|
83
|
-
* @param save.failed - called after failed operation
|
|
84
88
|
* @example
|
|
85
89
|
* ```javascript
|
|
86
90
|
* var jodit = new Jodit('.editor', {
|
|
@@ -103,7 +107,7 @@ export declare class ImageEditor extends ViewComponent {
|
|
|
103
107
|
* });
|
|
104
108
|
* ```
|
|
105
109
|
*/
|
|
106
|
-
open(url: string, save:
|
|
110
|
+
open(url: string, save: onSave): Promise<Dialog>;
|
|
107
111
|
constructor(editor: IViewBased);
|
|
108
112
|
/** @override */
|
|
109
113
|
destruct(): any;
|
|
@@ -114,3 +118,4 @@ export declare class ImageEditor extends ViewComponent {
|
|
|
114
118
|
export declare function openImageEditor(this: IViewBased & {
|
|
115
119
|
dataProvider: IFileBrowserDataProvider;
|
|
116
120
|
}, href: string, name: string, path: string, source: string, onSuccess?: () => void, onFailed?: (error: Error) => void): Promise<Dialog>;
|
|
121
|
+
export {};
|
|
@@ -10,7 +10,6 @@ import { Plugin } from 'jodit/core/plugin';
|
|
|
10
10
|
export declare class DragAndDropElement extends Plugin {
|
|
11
11
|
private dragList;
|
|
12
12
|
private draggable;
|
|
13
|
-
private wasMoved;
|
|
14
13
|
private isCopyMode;
|
|
15
14
|
/**
|
|
16
15
|
* Shift in pixels after which we consider that the transfer of the element has begun
|
|
@@ -18,6 +17,7 @@ export declare class DragAndDropElement extends Plugin {
|
|
|
18
17
|
private diffStep;
|
|
19
18
|
private startX;
|
|
20
19
|
private startY;
|
|
20
|
+
private state;
|
|
21
21
|
/** @override */
|
|
22
22
|
protected afterInit(): void;
|
|
23
23
|
/**
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
declare module 'jodit/config' {
|
|
7
|
+
interface Config {
|
|
8
|
+
/**
|
|
9
|
+
* When this option is enabled, the editor's content will be placed in an iframe and isolated from the rest of the page.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```javascript
|
|
13
|
+
* Jodit.make('#editor', {
|
|
14
|
+
* iframe: true,
|
|
15
|
+
* iframeStyle: 'html{margin: 0px;}body{padding:10px;background:transparent;color:#000;position:relative;z-index:2;\
|
|
16
|
+
* user-select:auto;margin:0px;overflow:hidden;}body:after{content:"";clear:both;display:block}';
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
iframe: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Allow editing the entire HTML document(html, head)
|
|
23
|
+
*/
|
|
24
|
+
editHTMLDocumentMode: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* You can redefine default page
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```javascript
|
|
30
|
+
* new Jodit('#editor', {
|
|
31
|
+
* iframe: true,
|
|
32
|
+
* iframeDefaultSrc: 'http://xdsoft.net/jodit/docs/',
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
iframeDefaultSrc: string;
|
|
37
|
+
/**
|
|
38
|
+
* Base URL where the root directory for {@link Jodit.defaultOptions.iframe|iframe} mode
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```javascript
|
|
42
|
+
* new Jodit('#editor', {
|
|
43
|
+
* iframe: true,
|
|
44
|
+
* iframeBaseUrl: 'http://xdsoft.net/jodit/docs/',
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
iframeBaseUrl: string;
|
|
49
|
+
/**
|
|
50
|
+
* Iframe title's content
|
|
51
|
+
*/
|
|
52
|
+
iframeTitle: string;
|
|
53
|
+
/**
|
|
54
|
+
* Iframe's DOCTYPE
|
|
55
|
+
*/
|
|
56
|
+
iframeDoctype: string;
|
|
57
|
+
/**
|
|
58
|
+
* Custom style to be used inside the iframe to display content.
|
|
59
|
+
* @example
|
|
60
|
+
* ```javascript
|
|
61
|
+
* new Jodit('#editor', {
|
|
62
|
+
* iframe: true,
|
|
63
|
+
* iframeStyle: 'html{margin: 0px;}',
|
|
64
|
+
* })
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
iframeStyle: string;
|
|
68
|
+
/**
|
|
69
|
+
* Custom stylesheet files to be used inside the iframe to display content.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```javascript
|
|
73
|
+
* new Jodit('#editor', {
|
|
74
|
+
* iframe: true,
|
|
75
|
+
* iframeCSSLinks: ['styles/default.css'],
|
|
76
|
+
* })
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
iframeCSSLinks: string[];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
@@ -7,17 +7,7 @@
|
|
|
7
7
|
* @module plugins/iframe
|
|
8
8
|
*/
|
|
9
9
|
import type { IJodit } from 'jodit/types';
|
|
10
|
-
|
|
11
|
-
interface Config {
|
|
12
|
-
editHTMLDocumentMode: boolean;
|
|
13
|
-
iframeDefaultSrc: string;
|
|
14
|
-
iframeBaseUrl: string;
|
|
15
|
-
iframeTitle: string;
|
|
16
|
-
iframeDoctype: string;
|
|
17
|
-
iframeStyle: string;
|
|
18
|
-
iframeCSSLinks: string[];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
10
|
+
import './config';
|
|
21
11
|
/**
|
|
22
12
|
* Iframe plugin - use `iframe` instead of DIV in editor. It can be need when you want attach custom styles in editor
|
|
23
13
|
* in backend of you system
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
3
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
|
+
* Copyright (c) 2013-2022 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
declare module 'jodit/config' {
|
|
7
|
+
interface Config {
|
|
8
|
+
image: {
|
|
9
|
+
dialogWidth: number;
|
|
10
|
+
/**
|
|
11
|
+
* Open editing dialog after double click on image
|
|
12
|
+
*/
|
|
13
|
+
openOnDblClick: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Show edit 'src' input
|
|
16
|
+
*/
|
|
17
|
+
editSrc: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Show crop/resize btn
|
|
20
|
+
*/
|
|
21
|
+
useImageEditor: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Show edit 'title' input
|
|
24
|
+
*/
|
|
25
|
+
editTitle: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Show edit 'alt' input
|
|
28
|
+
*/
|
|
29
|
+
editAlt: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Show edit image link's options
|
|
32
|
+
*/
|
|
33
|
+
editLink: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Show edit image size's inputs
|
|
36
|
+
*/
|
|
37
|
+
editSize: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Show edit margin inputs
|
|
40
|
+
*/
|
|
41
|
+
editMargins: boolean;
|
|
42
|
+
editBorderRadius: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Show edit classNames input
|
|
45
|
+
*/
|
|
46
|
+
editClass: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Show style edit input
|
|
49
|
+
*/
|
|
50
|
+
editStyle: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Show edit ID input
|
|
53
|
+
*/
|
|
54
|
+
editId: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Show Alignment selector
|
|
57
|
+
*/
|
|
58
|
+
editAlign: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Show preview image
|
|
61
|
+
*/
|
|
62
|
+
showPreview: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Select image after close dialog
|
|
65
|
+
*/
|
|
66
|
+
selectImageAfterClose: boolean;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export {};
|