|
|
@@ -658,15 +658,18 @@ export default class DowncastWriter {
|
|
|
* contains instances that are not {@link module:engine/view/text~Text Texts},
|
|
|
* {@link module:engine/view/attributeelement~AttributeElement AttributeElements},
|
|
|
* {@link module:engine/view/containerelement~ContainerElement ContainerElements},
|
|
|
- * {@link module:engine/view/emptyelement~EmptyElement EmptyElements} or
|
|
|
+ * {@link module:engine/view/emptyelement~EmptyElement EmptyElements},
|
|
|
+ * {@link module:engine/view/rawelement~RawElement RawElements} or
|
|
|
* {@link module:engine/view/uielement~UIElement UIElements}.
|
|
|
*
|
|
|
* @param {module:engine/view/position~Position} position Insertion position.
|
|
|
* @param {module:engine/view/text~Text|module:engine/view/attributeelement~AttributeElement|
|
|
|
* module:engine/view/containerelement~ContainerElement|module:engine/view/emptyelement~EmptyElement|
|
|
|
- * module:engine/view/uielement~UIElement|Iterable.<module:engine/view/text~Text|
|
|
|
+ * module:engine/view/rawelement~RawElement|module:engine/view/uielement~UIElement|
|
|
|
+ * Iterable.<module:engine/view/text~Text|
|
|
|
* module:engine/view/attributeelement~AttributeElement|module:engine/view/containerelement~ContainerElement|
|
|
|
- * module:engine/view/emptyelement~EmptyElement|module:engine/view/uielement~UIElement>} nodes Node or nodes to insert.
|
|
|
+ * module:engine/view/emptyelement~EmptyElement|module:engine/view/rawelement~RawElement|
|
|
|
+ * module:engine/view/uielement~UIElement>} nodes Node or nodes to insert.
|
|
|
* @returns {module:engine/view/range~Range} Range around inserted nodes.
|
|
|
*/
|
|
|
insert( position, nodes ) {
|
|
|
@@ -1905,21 +1908,12 @@ function mergeTextNodes( t1, t2 ) {
|
|
|
return new Position( t1, nodeBeforeLength );
|
|
|
}
|
|
|
|
|
|
-// Checks if provided nodes are valid to insert. Checks if each node is an instance of
|
|
|
-// {@link module:engine/view/text~Text Text} or {@link module:engine/view/attributeelement~AttributeElement AttributeElement},
|
|
|
-// {@link module:engine/view/containerelement~ContainerElement ContainerElement},
|
|
|
-// {@link module:engine/view/emptyelement~EmptyElement EmptyElement} or
|
|
|
-// {@link module:engine/view/uielement~UIElement UIElement}.
|
|
|
+// Checks if provided nodes are valid to insert. Checks if each node is an instance of a valid node.
|
|
|
//
|
|
|
// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert
|
|
|
-// contains instances that are not {@link module:engine/view/text~Text Texts},
|
|
|
-// {@link module:engine/view/emptyelement~EmptyElement EmptyElements},
|
|
|
-// {@link module:engine/view/uielement~UIElement UIElements},
|
|
|
-// {@link module:engine/view/attributeelement~AttributeElement AttributeElements} or
|
|
|
-// {@link module:engine/view/containerelement~ContainerElement ContainerElements}.
|
|
|
+// contains instances that are not supported ones (see error description for valid ones.
|
|
|
//
|
|
|
-// @param Iterable.<module:engine/view/text~Text|module:engine/view/attributeelement~AttributeElement
|
|
|
-// |module:engine/view/containerelement~ContainerElement> nodes
|
|
|
+// @param Iterable.<module:engine/view/text~Text|module:engine/view/element~Element> nodes
|
|
|
// @param {Object} errorContext
|
|
|
function validateNodesToInsert( nodes, errorContext ) {
|
|
|
for ( const node of nodes ) {
|