jodit 3.9.6 → 3.11.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/dictionaries/v_chupurnov.xml +1 -0
- package/.idea/workspace.xml +197 -179
- package/CHANGELOG.MD +279 -133
- package/build/jodit.css +185 -130
- package/build/jodit.es2018.css +175 -126
- package/build/jodit.es2018.en.css +175 -126
- package/build/jodit.es2018.en.js +709 -367
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +709 -367
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +1362 -900
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/package.json +22 -11
- package/src/core/async.ts +4 -0
- package/src/core/component/statuses.ts +6 -6
- package/src/core/dom.ts +25 -5
- package/src/core/events/event-emitter.ts +4 -2
- package/src/core/global.ts +15 -4
- package/src/core/helpers/append-script.ts +14 -0
- package/src/core/helpers/selector.ts +8 -3
- package/src/core/request/ajax.ts +5 -2
- package/src/core/request/response.ts +8 -4
- package/src/core/selection/style/api/toggle/toggle-css.ts +1 -1
- package/src/core/ui/button/button/button.less +8 -8
- package/src/core/ui/button/button/button.ts +9 -9
- package/src/core/ui/button/group/group.ts +2 -2
- package/src/core/ui/element.ts +4 -3
- package/src/core/ui/form/block/block.ts +1 -1
- package/src/core/ui/form/form.ts +8 -0
- package/src/core/ui/form/inputs/area/area.less +5 -0
- package/src/core/ui/form/inputs/area/area.ts +22 -1
- package/src/core/ui/form/inputs/checkbox/checkbox.less +50 -0
- package/src/core/ui/form/inputs/checkbox/checkbox.ts +48 -4
- package/src/core/ui/form/inputs/input/input.less +1 -1
- package/src/core/ui/form/inputs/input/input.ts +14 -4
- package/src/core/ui/icon.ts +2 -1
- package/src/core/ui/list/group.ts +2 -2
- package/src/core/ui/popup/popup.ts +59 -3
- package/src/jodit.ts +17 -14
- package/src/modules/dialog/dialog.less +0 -1
- package/src/modules/dialog/dialog.ts +2 -2
- package/src/modules/toolbar/collection/collection.ts +1 -6
- package/src/modules/toolbar/collection/editor-collection.ts +5 -1
- package/src/modules/widget/file-selector/file-selector.ts +1 -1
- package/src/modules/widget/tabs/tabs.less +1 -1
- package/src/modules/widget/tabs/tabs.ts +5 -3
- package/src/plugins/add-new-line/add-new-line.ts +1 -0
- package/src/plugins/clipboard/paste/paste.ts +1 -1
- package/src/plugins/image/image-properties/image-properties.ts +7 -0
- package/src/plugins/index.ts +1 -1
- package/src/plugins/keyboard/backspace/backspace.ts +183 -0
- package/src/plugins/keyboard/backspace/cases/check-join-neighbors.ts +117 -0
- package/src/plugins/keyboard/backspace/cases/check-join-two-lists.ts +55 -0
- package/src/plugins/keyboard/backspace/cases/check-not-collapsed.ts +27 -0
- package/src/plugins/keyboard/backspace/cases/check-remove-char.ts +191 -0
- package/src/plugins/keyboard/backspace/cases/check-remove-content-not-editable.ts +46 -0
- package/src/plugins/keyboard/backspace/cases/check-remove-empty-neighbor.ts +43 -0
- package/src/plugins/keyboard/backspace/cases/check-remove-empty-parent.ts +80 -0
- package/src/plugins/keyboard/backspace/cases/check-remove-unbreakable-element.ts +46 -0
- package/src/plugins/keyboard/backspace/cases/check-table-cell.ts +30 -0
- package/src/plugins/keyboard/backspace/cases/check-unwrap-first-list-item.ts +57 -0
- package/src/plugins/keyboard/backspace/cases/index.ts +27 -0
- package/src/plugins/keyboard/backspace/config.ts +33 -0
- package/src/plugins/keyboard/backspace/interface.d.ts +7 -0
- package/src/plugins/keyboard/helpers.ts +7 -3
- package/src/plugins/link/template.ts +2 -2
- package/src/plugins/print/preview.ts +103 -55
- package/src/plugins/resizer/resizer.ts +7 -2
- package/src/plugins/select.ts +0 -1
- package/src/plugins/source/const.ts +7 -0
- package/src/plugins/source/editor/engines/ace.ts +5 -0
- package/src/plugins/source/source.ts +19 -7
- package/src/styles/jodit.less +6 -0
- package/src/types/ajax.d.ts +3 -0
- package/src/types/async.d.ts +2 -0
- package/src/types/jodit.d.ts +5 -8
- package/src/types/popup.d.ts +1 -0
- package/src/types/ui.d.ts +23 -4
- package/types/core/async.d.ts +1 -0
- package/types/core/component/component.d.ts +6 -2
- package/types/core/component/statuses.d.ts +6 -6
- package/types/core/dom.d.ts +6 -2
- package/types/core/global.d.ts +1 -1
- package/types/core/helpers/append-script.d.ts +1 -0
- package/types/core/helpers/selector.d.ts +2 -3
- package/types/core/request/response.d.ts +2 -1
- package/types/core/ui/button/button/button.d.ts +3 -3
- package/types/core/ui/form/form.d.ts +1 -0
- package/types/core/ui/form/inputs/area/area.d.ts +7 -1
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +10 -3
- package/types/core/ui/icon.d.ts +1 -1
- package/types/core/ui/list/group.d.ts +2 -1
- package/types/core/ui/popup/popup.d.ts +2 -1
- package/types/jodit.d.ts +6 -6
- package/types/modules/toolbar/button/button.d.ts +1 -1
- package/types/modules/widget/tabs/tabs.d.ts +2 -1
- package/types/plugins/index.d.ts +1 -1
- package/types/plugins/keyboard/backspace/backspace.d.ts +28 -0
- package/types/plugins/keyboard/backspace/cases/check-join-neighbors.d.ts +10 -0
- package/types/plugins/keyboard/backspace/cases/check-join-two-lists.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-not-collapsed.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-remove-char.d.ts +20 -0
- package/types/plugins/keyboard/backspace/cases/check-remove-content-not-editable.d.ts +10 -0
- package/types/plugins/keyboard/backspace/cases/check-remove-empty-neighbor.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-remove-empty-parent.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-remove-unbreakable-element.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-table-cell.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/check-unwrap-first-list-item.d.ts +19 -0
- package/types/plugins/keyboard/backspace/cases/index.d.ts +8 -0
- package/types/plugins/keyboard/backspace/config.d.ts +20 -0
- package/types/plugins/keyboard/helpers.d.ts +2 -2
- package/types/plugins/select.d.ts +0 -1
- package/types/plugins/source/const.d.ts +6 -0
- package/types/plugins/source/editor/engines/ace.d.ts +1 -0
- package/types/plugins/source/source.d.ts +1 -0
- package/types/types/{ajax.d.ts → types/ajax.d.ts} +3 -0
- package/types/types/{async.d.ts → types/async.d.ts} +2 -0
- package/types/types/{context.d.ts → types/context.d.ts} +0 -0
- package/types/types/{core.ts → types/core.ts} +0 -0
- package/types/types/{create.d.ts → types/create.d.ts} +0 -0
- package/types/types/{dialog.d.ts → types/dialog.d.ts} +0 -0
- package/types/types/{events.d.ts → types/events.d.ts} +0 -0
- package/types/types/{file-browser.d.ts → types/file-browser.d.ts} +0 -0
- package/types/types/{form.d.ts → types/form.d.ts} +0 -0
- package/types/types/{index.d.ts → types/index.d.ts} +0 -0
- package/types/types/{jodit.d.ts → types/jodit.d.ts} +5 -8
- package/types/types/{observe.d.ts → types/observe.d.ts} +0 -0
- package/types/types/{plugin.d.ts → types/plugin.d.ts} +0 -0
- package/types/types/{popup.d.ts → types/popup.d.ts} +1 -0
- package/types/types/{select.d.ts → types/select.d.ts} +0 -0
- package/types/types/{source.d.ts → types/source.d.ts} +0 -0
- package/types/types/{storage.ts → types/storage.ts} +0 -0
- package/types/types/{style.d.ts → types/style.d.ts} +0 -0
- package/types/types/{toolbar.d.ts → types/toolbar.d.ts} +0 -0
- package/types/types/{traits.d.ts → types/traits.d.ts} +0 -0
- package/types/types/{types.d.ts → types/types.d.ts} +0 -0
- package/types/types/{ui.d.ts → types/ui.d.ts} +23 -4
- package/types/types/{uploader.d.ts → types/uploader.d.ts} +0 -0
- package/types/types/{view.d.ts → types/view.d.ts} +0 -0
- package/src/plugins/keyboard/delete.ts +0 -746
- package/types/plugins/keyboard/delete.d.ts +0 -161
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import './button.less';
|
|
7
|
-
import type { IUIButton, IUIButtonState, IUIButtonStatePartial, IViewBased,
|
|
7
|
+
import type { IUIButton, IUIButtonState, IUIButtonStatePartial, IViewBased, ButtonVariant } from '../../../../types';
|
|
8
8
|
import { UIElement } from '../../element';
|
|
9
9
|
export declare const UIButtonState: () => IUIButtonState;
|
|
10
10
|
export declare class UIButton extends UIElement implements IUIButton {
|
|
@@ -66,5 +66,5 @@ export declare class UIButton extends UIElement implements IUIButton {
|
|
|
66
66
|
}
|
|
67
67
|
export declare function Button(jodit: IViewBased, icon: string): IUIButton;
|
|
68
68
|
export declare function Button(jodit: IViewBased, icon: string, text?: string): IUIButton;
|
|
69
|
-
export declare function Button(jodit: IViewBased, icon: string, text: string,
|
|
70
|
-
export declare function Button(jodit: IViewBased, state: IUIButtonStatePartial,
|
|
69
|
+
export declare function Button(jodit: IViewBased, icon: string, text: string, variant?: ButtonVariant): IUIButton;
|
|
70
|
+
export declare function Button(jodit: IViewBased, state: IUIButtonStatePartial, variant?: ButtonVariant): IUIButton;
|
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import './area.less';
|
|
7
|
+
import type { IUITextArea, IViewBased } from '../../../../../types';
|
|
7
8
|
import { UIInput } from '../input/input';
|
|
8
|
-
export declare class UITextArea extends UIInput {
|
|
9
|
+
export declare class UITextArea extends UIInput implements IUITextArea {
|
|
9
10
|
/** @override */
|
|
10
11
|
className(): string;
|
|
12
|
+
/** @override */
|
|
13
|
+
static defaultState: IUITextArea['state'];
|
|
11
14
|
nativeInput: HTMLTextAreaElement;
|
|
12
15
|
/** @override */
|
|
16
|
+
state: IUITextArea['state'];
|
|
17
|
+
/** @override */
|
|
13
18
|
protected createContainer(options: this['state']): HTMLElement;
|
|
19
|
+
constructor(jodit: IViewBased, state: Partial<IUITextArea['state']>);
|
|
14
20
|
}
|
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import './checkbox.less';
|
|
7
|
-
import type {
|
|
7
|
+
import type { IViewBased, IUICheckBox } from '../../../../../types';
|
|
8
8
|
import { UIInput } from '../input/input';
|
|
9
|
-
export declare class UICheckbox extends UIInput {
|
|
9
|
+
export declare class UICheckbox extends UIInput implements IUICheckBox {
|
|
10
10
|
/** @override */
|
|
11
11
|
className(): string;
|
|
12
12
|
/** @override */
|
|
13
|
+
static defaultState: IUICheckBox['state'];
|
|
14
|
+
/** @override */
|
|
15
|
+
state: IUICheckBox['state'];
|
|
16
|
+
/** @override */
|
|
13
17
|
protected render(): HTMLElement;
|
|
14
18
|
/** @override **/
|
|
15
|
-
constructor(jodit: IViewBased, options: Partial<
|
|
19
|
+
constructor(jodit: IViewBased, options: Partial<IUICheckBox['state']>);
|
|
20
|
+
protected onChangeChecked(): void;
|
|
21
|
+
protected onChangeNativeCheckBox(): void;
|
|
22
|
+
protected onChangeSwitch(): void;
|
|
16
23
|
}
|
package/types/core/ui/icon.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { IUIButtonState, IUIElement, IUIGroup, IViewBased } from '../../../
|
|
|
8
8
|
import type { IDictionary } from '../../../types';
|
|
9
9
|
import { UIElement } from '../element';
|
|
10
10
|
export declare class UIGroup<T extends IViewBased = IViewBased> extends UIElement<T> implements IUIGroup {
|
|
11
|
+
readonly options?: IDictionary<any> | undefined;
|
|
11
12
|
/** @override */
|
|
12
13
|
className(): string;
|
|
13
14
|
/**
|
|
@@ -45,7 +46,7 @@ export declare class UIGroup<T extends IViewBased = IViewBased> extends UIElemen
|
|
|
45
46
|
/**
|
|
46
47
|
* @param elements - Items of group
|
|
47
48
|
*/
|
|
48
|
-
constructor(jodit: T, elements?: Array<IUIElement | void | null | false>, options?: IDictionary);
|
|
49
|
+
constructor(jodit: T, elements?: Array<IUIElement | void | null | false>, options?: IDictionary<any> | undefined);
|
|
49
50
|
/** @override */
|
|
50
51
|
destruct(): any;
|
|
51
52
|
}
|
|
@@ -26,6 +26,7 @@ export declare class Popup extends UIElement implements IPopup {
|
|
|
26
26
|
* Open popup near with some bound
|
|
27
27
|
*/
|
|
28
28
|
open(getBound: getBoundFunc, keepPosition?: boolean): this;
|
|
29
|
+
private calculateZIndex;
|
|
29
30
|
/**
|
|
30
31
|
* Calculate static bound for point
|
|
31
32
|
*/
|
|
@@ -56,7 +57,7 @@ export declare class Popup extends UIElement implements IPopup {
|
|
|
56
57
|
/**
|
|
57
58
|
* Set ZIndex
|
|
58
59
|
*/
|
|
59
|
-
setZIndex(index: number): void;
|
|
60
|
+
setZIndex(index: number | string): void;
|
|
60
61
|
constructor(jodit: IViewBased, smart?: boolean);
|
|
61
62
|
/** @override **/
|
|
62
63
|
destruct(): any;
|
package/types/jodit.d.ts
CHANGED
|
@@ -33,11 +33,6 @@ export declare class Jodit extends ViewWithToolbar implements IJodit {
|
|
|
33
33
|
* Plain text editor's value
|
|
34
34
|
*/
|
|
35
35
|
get text(): string;
|
|
36
|
-
/**
|
|
37
|
-
* HTML value
|
|
38
|
-
*/
|
|
39
|
-
get value(): string;
|
|
40
|
-
set value(html: string);
|
|
41
36
|
/**
|
|
42
37
|
* Return default timeout period in milliseconds for some debounce or throttle functions.
|
|
43
38
|
* By default return `{observer.timeout}` options
|
|
@@ -151,10 +146,15 @@ export declare class Jodit extends ViewWithToolbar implements IJodit {
|
|
|
151
146
|
* Set value to native editor
|
|
152
147
|
*/
|
|
153
148
|
setNativeEditorValue(value: string): void;
|
|
149
|
+
/**
|
|
150
|
+
* HTML value
|
|
151
|
+
*/
|
|
152
|
+
get value(): string;
|
|
153
|
+
set value(html: string);
|
|
154
154
|
/**
|
|
155
155
|
* Return editor value
|
|
156
156
|
*/
|
|
157
|
-
getEditorValue(removeSelectionMarkers?: boolean): string;
|
|
157
|
+
getEditorValue(removeSelectionMarkers?: boolean, consumer?: string): string;
|
|
158
158
|
private __callChangeCount;
|
|
159
159
|
/**
|
|
160
160
|
* Set editor html value and if set sync fill source element value
|
|
@@ -18,7 +18,7 @@ export declare class ToolbarButton<T extends IViewBased = IViewBased> extends UI
|
|
|
18
18
|
size: "small" | "middle" | "tiny" | "xsmall" | "large";
|
|
19
19
|
name: string;
|
|
20
20
|
value: string | number | boolean;
|
|
21
|
-
|
|
21
|
+
variant: import("../../../types").ButtonVariant;
|
|
22
22
|
type: "button" | "submit";
|
|
23
23
|
disabled: boolean;
|
|
24
24
|
activated: boolean;
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import './tabs.less';
|
|
7
7
|
import type { IJodit } from '../../../types';
|
|
8
|
+
import { UIElement } from '../../../core/ui';
|
|
8
9
|
export interface TabOption {
|
|
9
10
|
icon?: string;
|
|
10
11
|
name: string;
|
|
11
|
-
content: HTMLElement | (() => void);
|
|
12
|
+
content: HTMLElement | (() => void) | UIElement;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Build tabs system
|
package/types/plugins/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { addNewLine } from './add-new-line/add-new-line';
|
|
|
7
7
|
export { about } from './about/about';
|
|
8
8
|
export { focus } from './focus';
|
|
9
9
|
export { classSpan } from './class-span/class-span';
|
|
10
|
-
export {
|
|
10
|
+
export { Backspace } from './keyboard/backspace/backspace';
|
|
11
11
|
export { bold } from './bold';
|
|
12
12
|
export { cleanHtml } from './fix/clean-html';
|
|
13
13
|
export { WrapTextNodes } from './fix/wrap-text-nodes';
|
|
@@ -0,0 +1,28 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import { Plugin } from '../../../core/plugin';
|
|
7
|
+
import type { IJodit } from '../../../types';
|
|
8
|
+
import './config';
|
|
9
|
+
export declare class Backspace extends Plugin {
|
|
10
|
+
/** @override */
|
|
11
|
+
requires: string[];
|
|
12
|
+
/** @override */
|
|
13
|
+
protected afterInit(jodit: IJodit): void;
|
|
14
|
+
/** @override */
|
|
15
|
+
protected beforeDestruct(jodit: IJodit): void;
|
|
16
|
+
/**
|
|
17
|
+
* After Delete command remove extra BR
|
|
18
|
+
*/
|
|
19
|
+
private afterDeleteCommand;
|
|
20
|
+
/**
|
|
21
|
+
* Listener BackSpace or Delete button
|
|
22
|
+
*/
|
|
23
|
+
private onDelete;
|
|
24
|
+
/**
|
|
25
|
+
* Remove node and replace cursor position out of it
|
|
26
|
+
*/
|
|
27
|
+
private safeRemoveEmptyNode;
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Check if two separate elements can be connected
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkJoinNeighbors(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Try join two UL elements
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <ul><li>one</li></ul>|<ol><li>two</li></ol>
|
|
13
|
+
* ```
|
|
14
|
+
* Result
|
|
15
|
+
* ```html
|
|
16
|
+
* <ul><li>one|</li><li>two</li></ul>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkJoinTwoLists(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* On Not collapsed selection - should only remove whole selected content
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <p>first | stop</p><p>second | stop</p>
|
|
13
|
+
* ```
|
|
14
|
+
* result
|
|
15
|
+
* ```html
|
|
16
|
+
* <p>first | stop</p>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkNotCollapsed(jodit: IJodit): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
import type { DeleteMode } from '../interface';
|
|
8
|
+
/**
|
|
9
|
+
* Check possibility the char can be removed
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* te|st
|
|
14
|
+
* ```
|
|
15
|
+
* result
|
|
16
|
+
* ```html
|
|
17
|
+
* t|st
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function checkRemoveChar(jodit: IJodit, fakeNode: Node, backspace: boolean, mode: DeleteMode): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Проверяет возможность удаления не редактируемго элемента
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkRemoveContentNotEditable(jodit: IJodit, fakeNode: Text, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Check if it is possible to remove an empty adjacent element.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <p><br></p><p>|second stop</p>
|
|
13
|
+
* ```
|
|
14
|
+
* result
|
|
15
|
+
* ```html
|
|
16
|
+
* <p>|second stop</p>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkRemoveEmptyNeighbor(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Check if the current empty item can be removed
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <p>first stop</p><p>|<br></p>
|
|
13
|
+
* ```
|
|
14
|
+
* result
|
|
15
|
+
* ```html
|
|
16
|
+
* <p>first stop|</p>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkRemoveEmptyParent(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Check possibility inseparable Element can be removed (img, hr etc.)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <p>first second <img>| stop</p>
|
|
13
|
+
* ```
|
|
14
|
+
* result
|
|
15
|
+
* ```html
|
|
16
|
+
* <p>first second | stop</p>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkRemoveUnbreakableElement(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* Inside the CELL table - nothing to do
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <table><tr><td>|test</td></tr></table>
|
|
13
|
+
* ```
|
|
14
|
+
* result
|
|
15
|
+
* ```html
|
|
16
|
+
* <table><tr><td>|test</td></tr></table>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkTableCell(jodit: IJodit, fakeNode: Node): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import type { IJodit } from '../../../../types';
|
|
7
|
+
/**
|
|
8
|
+
* For first item in list on backspace try move his content in new P
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <ul><li>|first</li><li>second</li></ul>
|
|
13
|
+
* ```
|
|
14
|
+
* Result
|
|
15
|
+
* ```html
|
|
16
|
+
* <p>|first</p><ul><li>second</li></ul>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function checkUnwrapFirstListItem(jodit: IJodit, fakeNode: Node, backspace: boolean): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
import { checkRemoveContentNotEditable } from './check-remove-content-not-editable';
|
|
7
|
+
import { checkRemoveChar } from './check-remove-char';
|
|
8
|
+
export declare const cases: (typeof checkRemoveChar | typeof checkRemoveContentNotEditable)[];
|
|
@@ -0,0 +1,20 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
declare module '../../../config' {
|
|
7
|
+
interface Config {
|
|
8
|
+
delete: {
|
|
9
|
+
hotkeys: {
|
|
10
|
+
delete: string[];
|
|
11
|
+
deleteWord: string[];
|
|
12
|
+
deleteSentence: string[];
|
|
13
|
+
backspace: string[];
|
|
14
|
+
backspaceWord: string[];
|
|
15
|
+
backspaceSentence: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import type { Nullable } from '../../types';
|
|
6
|
+
import type { IJodit, Nullable } from '../../types';
|
|
7
7
|
export declare function getSibling(node: Node, backspace: boolean): Nullable<Node>;
|
|
8
8
|
/**
|
|
9
9
|
* Returns the nearest non-empty neighbor
|
|
@@ -22,4 +22,4 @@ export declare function findMostNestedNeighbor(node: Node, right: boolean, root:
|
|
|
22
22
|
* Moves the fake node inside the adjacent element if it lies next to it but not inside.
|
|
23
23
|
* When the cursor is positioned in its place, it must be inside the element and not outside its border.
|
|
24
24
|
*/
|
|
25
|
-
export declare function normalizeCursorPosition(node: Node, backspace: boolean): void;
|
|
25
|
+
export declare function normalizeCursorPosition(jodit: IJodit, node: Node, backspace: boolean): void;
|
|
@@ -24,7 +24,6 @@ export declare class select extends Plugin {
|
|
|
24
24
|
protected beforeDestruct(jodit: IJodit): void;
|
|
25
25
|
private onStartSelection;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
27
|
* @event outsideClick(e) - when user clicked in the outside of editor
|
|
29
28
|
*/
|
|
30
29
|
protected onOutsideClick(e: MouseEvent): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
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-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
|
+
*/
|
|
6
|
+
export declare const SOURCE_CONSUMER = "source-consumer";
|
|
@@ -28,6 +28,7 @@ export interface IResponse<T> {
|
|
|
28
28
|
|
|
29
29
|
json(): Promise<T>;
|
|
30
30
|
text(): Promise<string>;
|
|
31
|
+
blob(): Promise<Blob>;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export interface IAjax<T> extends IDestructible {
|
|
@@ -82,6 +83,8 @@ export interface AjaxOptions {
|
|
|
82
83
|
*/
|
|
83
84
|
headers?: IDictionary<string> | null;
|
|
84
85
|
|
|
86
|
+
responseType?: XMLHttpRequestResponseType;
|
|
87
|
+
|
|
85
88
|
/**
|
|
86
89
|
* Enable or disable Access-Control-Allow-Credentials client side. Useful for cross domain requests
|
|
87
90
|
*/
|
|
@@ -20,6 +20,8 @@ interface RejectablePromise<T> extends Promise<T> {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface IAsync extends IDestructible {
|
|
23
|
+
delay(timeout: number | IAsyncParams): Promise<void>;
|
|
24
|
+
|
|
23
25
|
setTimeout<T = any>(
|
|
24
26
|
callback: (...args: T[]) => void,
|
|
25
27
|
timeout: number | IAsyncParams,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,13 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { IViewOptions, IViewWithToolbar } from './view';
|
|
8
8
|
import type { Config } from '../config';
|
|
9
|
-
import type {
|
|
10
|
-
CustomCommand,
|
|
11
|
-
ICreate,
|
|
12
|
-
IObserver,
|
|
13
|
-
IStatusBar,
|
|
14
|
-
Modes
|
|
15
|
-
} from './';
|
|
9
|
+
import type { CustomCommand, ICreate, IObserver, IStatusBar, Modes } from './';
|
|
16
10
|
import type { IUploader } from './uploader';
|
|
17
11
|
import type { IFileBrowser } from './file-browser';
|
|
18
12
|
import { ISelect } from './select';
|
|
@@ -38,7 +32,10 @@ interface IJodit extends IViewWithToolbar {
|
|
|
38
32
|
element: HTMLElement;
|
|
39
33
|
|
|
40
34
|
getNativeEditorValue(): string;
|
|
41
|
-
getEditorValue(
|
|
35
|
+
getEditorValue(
|
|
36
|
+
removeSelectionMarkers?: boolean,
|
|
37
|
+
consumer?: string
|
|
38
|
+
): string;
|
|
42
39
|
setEditorValue(value?: string): void;
|
|
43
40
|
|
|
44
41
|
getReadOnly(): boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -50,7 +50,7 @@ export interface IUIIconState {
|
|
|
50
50
|
fill: string;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export type
|
|
53
|
+
export type ButtonVariant =
|
|
54
54
|
| 'initial'
|
|
55
55
|
| 'default'
|
|
56
56
|
| 'primary'
|
|
@@ -62,7 +62,9 @@ export interface IUIButtonState {
|
|
|
62
62
|
size: 'tiny' | 'xsmall' | 'small' | 'middle' | 'large';
|
|
63
63
|
name: string;
|
|
64
64
|
value: string | number | boolean;
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
variant: ButtonVariant;
|
|
67
|
+
|
|
66
68
|
type: 'button' | 'submit';
|
|
67
69
|
disabled: boolean;
|
|
68
70
|
activated: boolean;
|
|
@@ -131,11 +133,11 @@ export interface IUIInput extends IUIElement {
|
|
|
131
133
|
className: string;
|
|
132
134
|
autocomplete: boolean;
|
|
133
135
|
name: string;
|
|
134
|
-
value: string;
|
|
136
|
+
value: string | number;
|
|
135
137
|
icon: string;
|
|
136
138
|
label: string;
|
|
137
139
|
ref: string;
|
|
138
|
-
type: 'text' | 'checkbox' | 'url' | 'file' | 'hidden';
|
|
140
|
+
type: 'text' | 'number' |'checkbox' | 'url' | 'file' | 'hidden';
|
|
139
141
|
placeholder: string;
|
|
140
142
|
required: boolean;
|
|
141
143
|
validators: string[];
|
|
@@ -170,9 +172,26 @@ export interface IUISelect extends IUIInput {
|
|
|
170
172
|
};
|
|
171
173
|
}
|
|
172
174
|
|
|
175
|
+
export interface IUITextArea extends IUIInput {
|
|
176
|
+
readonly nativeInput: HTMLTextAreaElement;
|
|
177
|
+
|
|
178
|
+
readonly state: IUIInput['state'] & {
|
|
179
|
+
size?: number;
|
|
180
|
+
resizable?: boolean;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
173
184
|
export interface IUIRange extends IUIInput {
|
|
174
185
|
readonly state: IUIInput['state'] & {
|
|
175
186
|
min: number;
|
|
176
187
|
max: number;
|
|
177
188
|
};
|
|
178
189
|
}
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
export interface IUICheckBox extends IUIInput {
|
|
193
|
+
readonly state: IUIInput['state'] & {
|
|
194
|
+
checked: boolean;
|
|
195
|
+
switch: boolean;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
File without changes
|