@ckeditor/ckeditor5-editor-classic 41.4.2 → 42.0.0-alpha.1
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/README.md +7 -1
- package/build/editor-classic.js +1 -1
- package/dist/index.js +214 -227
- package/dist/index.js.map +1 -1
- package/dist/types/classiceditor.d.ts +3 -49
- package/package.json +2 -2
- package/src/classiceditor.d.ts +3 -49
- package/src/classiceditor.js +3 -50
package/src/classiceditor.js
CHANGED
@@ -7,34 +7,17 @@
|
|
7
7
|
*/
|
8
8
|
import ClassicEditorUI from './classiceditorui.js';
|
9
9
|
import ClassicEditorUIView from './classiceditoruiview.js';
|
10
|
-
import { Editor,
|
10
|
+
import { Editor, ElementApiMixin, attachToForm } from 'ckeditor5/src/core.js';
|
11
11
|
import { getDataFromElement, CKEditorError } from 'ckeditor5/src/utils.js';
|
12
|
-
import { ContextWatchdog, EditorWatchdog } from 'ckeditor5/src/watchdog.js';
|
13
12
|
import { isElement as _isElement } from 'lodash-es';
|
14
13
|
/**
|
15
|
-
* The
|
16
|
-
* It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
|
14
|
+
* The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
|
17
15
|
* See the {@glink examples/builds/classic-editor demo}.
|
18
16
|
*
|
19
17
|
* In order to create a classic editor instance, use the static
|
20
18
|
* {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`} method.
|
21
|
-
*
|
22
|
-
* # Classic editor and classic build
|
23
|
-
*
|
24
|
-
* The classic editor can be used directly from source (if you installed the
|
25
|
-
* [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package)
|
26
|
-
* but it is also available in the {@glink installation/getting-started/predefined-builds#classic-editor classic build}.
|
27
|
-
*
|
28
|
-
* {@glink installation/getting-started/predefined-builds Builds}
|
29
|
-
* are ready-to-use editors with plugins bundled in. When using the editor from
|
30
|
-
* source you need to take care of loading all plugins by yourself
|
31
|
-
* (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option).
|
32
|
-
* Using the editor from source gives much better flexibility and allows easier customization.
|
33
|
-
*
|
34
|
-
* Read more about initializing the editor from source or as a build in
|
35
|
-
* {@link module:editor-classic/classiceditor~ClassicEditor.create `ClassicEditor.create()`}.
|
36
19
|
*/
|
37
|
-
class ClassicEditor extends ElementApiMixin(Editor) {
|
20
|
+
export default class ClassicEditor extends /* #__PURE__ */ ElementApiMixin(Editor) {
|
38
21
|
/**
|
39
22
|
* Creates an instance of the classic editor.
|
40
23
|
*
|
@@ -156,17 +139,6 @@ class ClassicEditor extends ElementApiMixin(Editor) {
|
|
156
139
|
* See the {@link module:core/editor/editorconfig~EditorConfig editor configuration documentation} to learn more about
|
157
140
|
* customizing plugins, toolbar and more.
|
158
141
|
*
|
159
|
-
* # Using the editor from source
|
160
|
-
*
|
161
|
-
* The code samples listed in the previous sections of this documentation assume that you are using an
|
162
|
-
* {@glink installation/getting-started/predefined-builds editor build} (for example – `@ckeditor/ckeditor5-build-classic`).
|
163
|
-
*
|
164
|
-
* If you want to use the classic editor from source (`@ckeditor/ckeditor5-editor-classic/src/classiceditor`),
|
165
|
-
* you need to define the list of
|
166
|
-
* {@link module:core/editor/editorconfig~EditorConfig#plugins plugins to be initialized} and
|
167
|
-
* {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar items}. Read more about using the editor from
|
168
|
-
* source in the {@glink installation/advanced/alternative-setups/integrating-from-source-webpack dedicated guide}.
|
169
|
-
*
|
170
142
|
* @param sourceElementOrData The DOM element that will be the source for the created editor
|
171
143
|
* or the editor's initial data.
|
172
144
|
*
|
@@ -196,25 +168,6 @@ class ClassicEditor extends ElementApiMixin(Editor) {
|
|
196
168
|
});
|
197
169
|
}
|
198
170
|
}
|
199
|
-
/**
|
200
|
-
* The {@link module:core/context~Context} class.
|
201
|
-
*
|
202
|
-
* Exposed as static editor field for easier access in editor builds.
|
203
|
-
*/
|
204
|
-
ClassicEditor.Context = Context;
|
205
|
-
/**
|
206
|
-
* The {@link module:watchdog/editorwatchdog~EditorWatchdog} class.
|
207
|
-
*
|
208
|
-
* Exposed as static editor field for easier access in editor builds.
|
209
|
-
*/
|
210
|
-
ClassicEditor.EditorWatchdog = EditorWatchdog;
|
211
|
-
/**
|
212
|
-
* The {@link module:watchdog/contextwatchdog~ContextWatchdog} class.
|
213
|
-
*
|
214
|
-
* Exposed as static editor field for easier access in editor builds.
|
215
|
-
*/
|
216
|
-
ClassicEditor.ContextWatchdog = ContextWatchdog;
|
217
|
-
export default ClassicEditor;
|
218
171
|
function getInitialData(sourceElementOrData) {
|
219
172
|
return isElement(sourceElementOrData) ? getDataFromElement(sourceElementOrData) : sourceElementOrData;
|
220
173
|
}
|