@ckeditor/ckeditor5-core 48.2.0-alpha.5 → 48.2.0-alpha.7
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/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -3079,7 +3079,7 @@ function isTextArea(sourceElement) {
|
|
|
3079
3079
|
* {@link module:core/editor/editorconfig~RootConfig#initialData `config.root.initialData`}.
|
|
3080
3080
|
*
|
|
3081
3081
|
* A tag name string (e.g. `'h1'`) or a
|
|
3082
|
-
* {@link module:
|
|
3082
|
+
* {@link module:core/editor/editorconfig~ViewRootElementDefinition view root element definition} are still
|
|
3083
3083
|
* accepted - they describe the editable root element the classic editor creates inside its UI box.
|
|
3084
3084
|
*
|
|
3085
3085
|
* @error editor-create-root-element-not-supported
|
|
@@ -3303,8 +3303,8 @@ function isTextArea(sourceElement) {
|
|
|
3303
3303
|
const stylesOverrode = hasStyles && !!attrStyle;
|
|
3304
3304
|
if (stylesOverrode) {
|
|
3305
3305
|
/**
|
|
3306
|
-
* Both the {@link module:
|
|
3307
|
-
* and the {@link module:
|
|
3306
|
+
* Both the {@link module:core/editor/editorconfig~ViewRootElementDefinition#styles `styles`} object
|
|
3307
|
+
* and the {@link module:core/editor/editorconfig~ViewRootElementDefinition#attributes `attributes.style`}
|
|
3308
3308
|
* string were provided in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}.
|
|
3309
3309
|
* Provide one or the other - the object form takes precedence.
|
|
3310
3310
|
*
|
|
@@ -3358,6 +3358,12 @@ function isTextArea(sourceElement) {
|
|
|
3358
3358
|
}
|
|
3359
3359
|
/**
|
|
3360
3360
|
* Throws when the given tag name cannot be used as an editable root.
|
|
3361
|
+
*
|
|
3362
|
+
* The `<textarea>` and `<input>` elements are form fields and cannot contain other HTML elements,
|
|
3363
|
+
* so the editor cannot render rich-text content inside them.
|
|
3364
|
+
*
|
|
3365
|
+
* To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,
|
|
3366
|
+
* or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.
|
|
3361
3367
|
*/ function assertAllowedTagName(name) {
|
|
3362
3368
|
if ([
|
|
3363
3369
|
'textarea',
|
|
@@ -3365,7 +3371,11 @@ function isTextArea(sourceElement) {
|
|
|
3365
3371
|
].includes(name.toLowerCase())) {
|
|
3366
3372
|
/**
|
|
3367
3373
|
* The DOM tag name specified in {@link module:core/editor/editorconfig~RootConfig#element `config.root.element`}
|
|
3368
|
-
* cannot be used as an editor's editable root.
|
|
3374
|
+
* cannot be used as an editor's editable root. The `<textarea>` and `<input>` elements are form fields and
|
|
3375
|
+
* cannot contain other HTML elements, so the editor cannot render rich-text content inside them.
|
|
3376
|
+
*
|
|
3377
|
+
* To fix the error, use a tag that can contain other elements - for example `'div'`, `'section'`, `'article'`,
|
|
3378
|
+
* or a heading like `'h1'`. You can also omit the `name` field to use the default `'div'`.
|
|
3369
3379
|
*
|
|
3370
3380
|
* @error editor-wrong-element
|
|
3371
3381
|
*/ throw new CKEditorError('editor-wrong-element', null);
|