|
@@ -241,8 +241,8 @@ export function stringify( node, selectionOrPositionOrRange = null ) {
|
|
|
* @param {Object} [options={}] Additional configuration.
|
|
* @param {Object} [options={}] Additional configuration.
|
|
|
* @param {Array<Object>} [options.selectionAttributes] A list of attributes which will be passed to the selection.
|
|
* @param {Array<Object>} [options.selectionAttributes] A list of attributes which will be passed to the selection.
|
|
|
* @param {Boolean} [options.lastRangeBackward=false] If set to `true`, the last range will be added as backward.
|
|
* @param {Boolean} [options.lastRangeBackward=false] If set to `true`, the last range will be added as backward.
|
|
|
- * @param {module:engine/model/schema~SchemaContextDefinition} [options.context=[ '$root' ]] The conversion context.
|
|
|
|
|
- * If not provided, the default `[ '$root' ]` will be used.
|
|
|
|
|
|
|
+ * @param {module:engine/model/schema~SchemaContextDefinition} [options.context='$root'] The conversion context.
|
|
|
|
|
+ * If not provided, the default `'$root'` will be used.
|
|
|
* @returns {module:engine/model/element~Element|module:engine/model/text~Text|
|
|
* @returns {module:engine/model/element~Element|module:engine/model/text~Text|
|
|
|
* module:engine/model/documentfragment~DocumentFragment|Object} Returns the parsed model node or
|
|
* module:engine/model/documentfragment~DocumentFragment|Object} Returns the parsed model node or
|
|
|
* an object with two fields: `model` and `selection`, when selection ranges were included in the data to parse.
|
|
* an object with two fields: `model` and `selection`, when selection ranges were included in the data to parse.
|
|
@@ -280,7 +280,7 @@ export function parse( data, schema, options = {} ) {
|
|
|
viewToModel.isDebug = true;
|
|
viewToModel.isDebug = true;
|
|
|
|
|
|
|
|
// Convert view to model.
|
|
// Convert view to model.
|
|
|
- let model = viewToModel.convert( viewDocumentFragment.root, options.context || [ '$root' ] );
|
|
|
|
|
|
|
+ let model = viewToModel.convert( viewDocumentFragment.root, options.context || '$root' );
|
|
|
|
|
|
|
|
mapper.bindElements( model, viewDocumentFragment.root );
|
|
mapper.bindElements( model, viewDocumentFragment.root );
|
|
|
|
|
|