@ckeditor/ckeditor5-engine
Advanced tools
Comparing version 15.0.0 to 16.0.0
{ | ||
"name": "@ckeditor/ckeditor5-engine", | ||
"version": "15.0.0", | ||
"version": "16.0.0", | ||
"description": "The editing engine of CKEditor 5 – the best browser-based rich text editor.", | ||
@@ -24,24 +24,26 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-utils": "^15.0.0", | ||
"@ckeditor/ckeditor5-utils": "^16.0.0", | ||
"lodash-es": "^4.17.10" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^15.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^15.0.0", | ||
"@ckeditor/ckeditor5-core": "^15.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^15.0.0", | ||
"@ckeditor/ckeditor5-enter": "^15.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^15.0.0", | ||
"@ckeditor/ckeditor5-heading": "^15.0.0", | ||
"@ckeditor/ckeditor5-link": "^15.0.0", | ||
"@ckeditor/ckeditor5-list": "^15.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^15.0.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^15.0.0", | ||
"@ckeditor/ckeditor5-typing": "^15.0.0", | ||
"@ckeditor/ckeditor5-undo": "^15.0.0", | ||
"@ckeditor/ckeditor5-widget": "^15.0.0", | ||
"@ckeditor/ckeditor5-basic-styles": "^16.0.0", | ||
"@ckeditor/ckeditor5-block-quote": "^16.0.0", | ||
"@ckeditor/ckeditor5-core": "^16.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^16.0.0", | ||
"@ckeditor/ckeditor5-enter": "^16.0.0", | ||
"@ckeditor/ckeditor5-essentials": "^16.0.0", | ||
"@ckeditor/ckeditor5-heading": "^16.0.0", | ||
"@ckeditor/ckeditor5-link": "^16.0.0", | ||
"@ckeditor/ckeditor5-list": "^16.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^16.0.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^16.0.0", | ||
"@ckeditor/ckeditor5-typing": "^16.0.0", | ||
"@ckeditor/ckeditor5-undo": "^16.0.0", | ||
"@ckeditor/ckeditor5-widget": "^16.0.0", | ||
"eslint": "^5.5.0", | ||
"eslint-config-ckeditor5": "^2.0.0", | ||
"husky": "^1.3.1", | ||
"lint-staged": "^7.0.0" | ||
"lint-staged": "^7.0.0", | ||
"stylelint": "^11.1.1", | ||
"stylelint-config-ckeditor5": "^1.0.0" | ||
}, | ||
@@ -66,3 +68,4 @@ "engines": { | ||
"scripts": { | ||
"lint": "eslint --quiet '**/*.js'" | ||
"lint": "eslint --quiet '**/*.js'", | ||
"stylelint": "stylelint --quiet --allow-empty-input 'theme/**/*.css' 'docs/**/*.css'" | ||
}, | ||
@@ -72,2 +75,5 @@ "lint-staged": { | ||
"eslint --quiet" | ||
], | ||
"**/*.css": [ | ||
"stylelint --quiet --allow-empty-input" | ||
] | ||
@@ -74,0 +80,0 @@ }, |
@@ -20,2 +20,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { dumpTrees, initDocumentDumping } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -77,3 +79,3 @@ * Controller for the editing pipeline. The editing pipeline controls {@link ~EditingController#model model} rendering, | ||
// | ||
// See https://github.com/ckeditor/ckeditor5-engine/issues/1528 | ||
// See https://github.com/ckeditor/ckeditor5-engine/issues/1528 | ||
this.listenTo( this.model, '_beforeChanges', () => { | ||
@@ -126,2 +128,12 @@ this.view._disableRendering( true ); | ||
} ); | ||
// @if CK_DEBUG_ENGINE // initDocumentDumping( this.model.document ); | ||
// @if CK_DEBUG_ENGINE // initDocumentDumping( this.view.document ); | ||
// @if CK_DEBUG_ENGINE // dumpTrees( this.model.document, this.model.document.version ); | ||
// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version ); | ||
// @if CK_DEBUG_ENGINE // this.model.document.on( 'change', () => { | ||
// @if CK_DEBUG_ENGINE // dumpTrees( this.view.document, this.model.document.version ); | ||
// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } ); | ||
} | ||
@@ -128,0 +140,0 @@ |
@@ -207,2 +207,15 @@ /** | ||
* | ||
* *Note:* Downcasting to a style property requires providing `value` as an object: | ||
* | ||
* editor.conversion.for( 'downcast' ).attributeToAttribute( { | ||
* model: 'lineHeight', | ||
* view: modelAttributeValue => ( { | ||
* key: 'style', | ||
* value: { | ||
* 'line-height': modelAttributeValue, | ||
* 'border-bottom': '1px dotted #ba2' | ||
* } | ||
* } ) | ||
* } ); | ||
* | ||
* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter | ||
@@ -209,0 +222,0 @@ * to the conversion process. |
@@ -240,2 +240,29 @@ /** | ||
* | ||
* Converting styles works a bit differently as it requires `view.styles` to be an object and by default | ||
* a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value` | ||
* callback that returns the desired value. | ||
* | ||
* // Default conversion of font-weight style will result in setting bold attribute to true. | ||
* editor.conversion.for( 'upcast' ).attributeToAttribute( { | ||
* view: { | ||
* styles: { | ||
* 'font-weight': 'bold' | ||
* } | ||
* }, | ||
* model: 'bold' | ||
* } ); | ||
* | ||
* // This converter will pass any style value to the `lineHeight` model attribute. | ||
* editor.conversion.for( 'upcast' ).attributeToAttribute( { | ||
* view: { | ||
* styles: { | ||
* 'line-height': /[\s\S]+/ | ||
* } | ||
* }, | ||
* model: { | ||
* key: 'lineHeight', | ||
* value: viewElement => viewElement.getStyle( 'line-height' ) | ||
* } | ||
* } ); | ||
* | ||
* See {@link module:engine/conversion/conversion~Conversion#for `conversion.for()`} to learn how to add a converter | ||
@@ -242,0 +269,0 @@ * to the conversion process. |
@@ -21,2 +21,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' ); | ||
const graveyardName = '$graveyard'; | ||
@@ -469,2 +471,7 @@ | ||
*/ | ||
// @if CK_DEBUG_ENGINE // log( version = null ) { | ||
// @if CK_DEBUG_ENGINE // version = version === null ? this.version : version; | ||
// @if CK_DEBUG_ENGINE // logDocument( this, version ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -471,0 +478,0 @@ |
@@ -16,2 +16,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { stringifyMap } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -322,2 +324,40 @@ * DocumentFragment represents a part of model which does not have a common root but it's top-level nodes | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return 'documentFragment'; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelDocumentFragment: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // printTree() { | ||
// @if CK_DEBUG_ENGINE // let string = 'ModelDocumentFragment: ['; | ||
// @if CK_DEBUG_ENGINE // for ( const child of this.getChildren() ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n'; | ||
// @if CK_DEBUG_ENGINE // if ( child.is( 'text' ) ) { | ||
// @if CK_DEBUG_ENGINE // const textAttrs = stringifyMap( child._attrs ); | ||
// @if CK_DEBUG_ENGINE // string += '\t'.repeat( 1 ); | ||
// @if CK_DEBUG_ENGINE // if ( textAttrs !== '' ) { | ||
// @if CK_DEBUG_ENGINE // string += `<$text${ textAttrs }>` + child.data + '</$text>'; | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += child.data; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += child.printTree( 1 ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // string += '\n]'; | ||
// @if CK_DEBUG_ENGINE // return string; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logTree() { | ||
// @if CK_DEBUG_ENGINE // console.log( this.printTree() ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -324,0 +364,0 @@ |
@@ -16,2 +16,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { stringifyMap, convertMapToStringifiedObject, convertMapToTags } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -326,2 +328,63 @@ * Model element. Type of {@link module:engine/model/node~Node node} that has a {@link module:engine/model/element~Element#name name} and | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `<${ this.rootName || this.name }>`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelElement: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logExtended() { | ||
// @if CK_DEBUG_ENGINE // console.log( `ModelElement: ${ this }, ${ this.childCount } children, | ||
// @if CK_DEBUG_ENGINE // attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logAll() { | ||
// @if CK_DEBUG_ENGINE // console.log( '--------------------' ); | ||
// @if CK_DEBUG_ENGINE // | ||
// @if CK_DEBUG_ENGINE // this.logExtended(); | ||
// @if CK_DEBUG_ENGINE // console.log( 'List of children:' ); | ||
// @if CK_DEBUG_ENGINE // | ||
// @if CK_DEBUG_ENGINE // for ( const child of this.getChildren() ) { | ||
// @if CK_DEBUG_ENGINE // child.log(); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // printTree( level = 0) { | ||
// @if CK_DEBUG_ENGINE // let string = ''; | ||
// @if CK_DEBUG_ENGINE // string += '\t'.repeat( level ); | ||
// @if CK_DEBUG_ENGINE // string += `<${ this.rootName || this.name }${ convertMapToTags( this.getAttributes() ) }>`; | ||
// @if CK_DEBUG_ENGINE // for ( const child of this.getChildren() ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n'; | ||
// @if CK_DEBUG_ENGINE // if ( child.is( 'text' ) ) { | ||
// @if CK_DEBUG_ENGINE // const textAttrs = convertMapToTags( child._attrs ); | ||
// @if CK_DEBUG_ENGINE // string += '\t'.repeat( level + 1 ); | ||
// @if CK_DEBUG_ENGINE // if ( textAttrs !== '' ) { | ||
// @if CK_DEBUG_ENGINE // string += `<$text${ textAttrs }>` + child.data + '</$text>'; | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += child.data; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += child.printTree( level + 1 ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // if ( this.childCount ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + '\t'.repeat( level ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // string += `</${ this.rootName || this.name }>`; | ||
// @if CK_DEBUG_ENGINE // return string; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logTree() { | ||
// @if CK_DEBUG_ENGINE // console.log( this.printTree() ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -328,0 +391,0 @@ |
@@ -292,3 +292,3 @@ /** | ||
* {@link module:engine/model/markercollection~MarkerCollection#event:update} listeners to listen on changes in a group of markers. | ||
* For instance: `model.markers.on( 'set:user', callback );` will be called whenever any `user:*` markers changes. | ||
* For instance: `model.markers.on( 'update:user', callback );` will be called whenever any `user:*` markers changes. | ||
* | ||
@@ -295,0 +295,0 @@ * There are two types of markers. |
@@ -29,2 +29,5 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { dumpTrees } = require( '../dev-utils/utils' ); | ||
// @if CK_DEBUG_ENGINE // const { OperationReplayer } = require( '../dev-utils/operationreplayer' ).default; | ||
/** | ||
@@ -120,2 +123,6 @@ * Editor's data model. Read about the model in the | ||
injectSelectionPostFixer( this ); | ||
// @if CK_DEBUG_ENGINE // this.on( 'applyOperation', () => { | ||
// @if CK_DEBUG_ENGINE // dumpTrees( this.document, this.document.version ); | ||
// @if CK_DEBUG_ENGINE // }, { priority: 'lowest' } ); | ||
} | ||
@@ -170,2 +177,4 @@ | ||
} catch ( err ) { | ||
// @if CK_DEBUG // throw err; | ||
/* istanbul ignore next */ | ||
CKEditorError.rethrowUnexpectedError( err, this ); | ||
@@ -223,2 +232,4 @@ } | ||
} catch ( err ) { | ||
// @if CK_DEBUG // throw err; | ||
/* istanbul ignore next */ | ||
CKEditorError.rethrowUnexpectedError( err, this ); | ||
@@ -240,5 +251,31 @@ } | ||
applyOperation( operation ) { | ||
// @if CK_DEBUG_ENGINE // console.log( 'Applying ' + operation ); | ||
// @if CK_DEBUG_ENGINE // if ( !this._operationLogs ) { | ||
// @if CK_DEBUG_ENGINE // this._operationLogs = []; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // this._operationLogs.push( JSON.stringify( operation ) ); | ||
// @if CK_DEBUG_ENGINE //if ( !this._appliedOperations ) { | ||
// @if CK_DEBUG_ENGINE // this._appliedOperations = []; | ||
// @if CK_DEBUG_ENGINE //} | ||
// @if CK_DEBUG_ENGINE //this._appliedOperations.push( operation ); | ||
operation._execute(); | ||
} | ||
// @if CK_DEBUG_ENGINE // getAppliedOperation() { | ||
// @if CK_DEBUG_ENGINE // if ( !this._appliedOperations ) { | ||
// @if CK_DEBUG_ENGINE // return ''; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // return this._appliedOperations.map( JSON.stringify ).join( '-------' ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // createReplayer( stringifiedOperations ) { | ||
// @if CK_DEBUG_ENGINE // return new OperationReplayer( this, '-------', stringifiedOperations ); | ||
// @if CK_DEBUG_ENGINE // } | ||
/** | ||
@@ -277,3 +314,3 @@ * Inserts content at the position in the editor specified by the selection, as one would expect the paste | ||
* // | ||
* // <paragrap>foo</paragraph> | ||
* // <paragraph>foo</paragraph> | ||
* // <blockQuote> | ||
@@ -280,0 +317,0 @@ * // <paragraph>bar</paragraph> |
@@ -197,2 +197,8 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `AttributeOperation( ${ this.baseVersion } ): ` + | ||
// @if CK_DEBUG_ENGINE // `"${ this.key }": ${ JSON.stringify( this.oldValue ) }` + | ||
// @if CK_DEBUG_ENGINE // ` -> ${ JSON.stringify( this.newValue ) }, ${ this.range }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -15,2 +15,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default; | ||
/** | ||
@@ -94,2 +96,10 @@ * Operation to permanently remove node from detached root. | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // const range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany ); | ||
// @if CK_DEBUG_ENGINE // const nodes = Array.from( range.getItems() ); | ||
// @if CK_DEBUG_ENGINE // const nodeString = nodes.length > 1 ? `[ ${ nodes.length } ]` : nodes[ 0 ]; | ||
// @if CK_DEBUG_ENGINE // return `DetachOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ range }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -182,2 +182,8 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // const nodeString = this.nodes.length > 1 ? `[ ${ this.nodes.length } ]` : this.nodes.getNode( 0 ); | ||
// @if CK_DEBUG_ENGINE // return `InsertOperation( ${ this.baseVersion } ): ${ nodeString } -> ${ this.position }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -149,2 +149,7 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `MarkerOperation( ${ this.baseVersion } ): ` + | ||
// @if CK_DEBUG_ENGINE // `"${ this.name }": ${ this.oldRange } -> ${ this.newRange }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -213,2 +213,8 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `MergeOperation( ${ this.baseVersion } ): ` + | ||
// @if CK_DEBUG_ENGINE // `${ this.sourcePosition } -> ${ this.targetPosition }` + | ||
// @if CK_DEBUG_ENGINE // ` ( ${ this.howMany } ), ${ this.graveyardPosition }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -17,2 +17,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const ModelRange = require( '../range' ).default; | ||
/** | ||
@@ -202,2 +204,8 @@ * Operation to move a range of {@link module:engine/model/item~Item model items} | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // const range = ModelRange._createFromPositionAndShift( this.sourcePosition, this.howMany ); | ||
// @if CK_DEBUG_ENGINE // return `MoveOperation( ${ this.baseVersion } ): ${ range } -> ${ this.targetPosition }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -54,2 +54,6 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `NoOperation( ${ this.baseVersion } )`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -135,2 +135,6 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( this.toString() ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -150,2 +150,7 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `RenameOperation( ${ this.baseVersion } ): ` + | ||
// @if CK_DEBUG_ENGINE // `${ this.position }: "${ this.oldName }" -> "${ this.newName }"`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -210,2 +210,8 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `RootAttributeOperation( ${ this.baseVersion } ): ` + | ||
// @if CK_DEBUG_ENGINE // `"${ this.key }": ${ JSON.stringify( this.oldValue ) }` + | ||
// @if CK_DEBUG_ENGINE // ` -> ${ JSON.stringify( this.newValue ) }, ${ this.root.rootName }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -253,2 +253,8 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `SplitOperation( ${ this.baseVersion } ): ${ this.splitPosition } ` + | ||
// @if CK_DEBUG_ENGINE // `( ${ this.howMany } ) -> ${ this.insertionPosition }` + | ||
// @if CK_DEBUG_ENGINE // `${ this.graveyardPosition ? ' with ' + this.graveyardPosition : '' }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -1017,2 +1017,10 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `${ this.root } [ ${ this.path.join( ', ' ) } ]`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelPosition: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -1019,0 +1027,0 @@ |
@@ -961,2 +961,10 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `${ this.root } [ ${ this.start.path.join( ', ' ) } ] - [ ${ this.end.path.join( ', ' ) } ]`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelPosition: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -101,2 +101,10 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return this.rootName; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelRootElement: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -12,2 +12,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -119,2 +121,14 @@ * Model text node. Type of {@link module:engine/model/node~Node node} that contains {@link module:engine/model/text~Text#data text data}. | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `#${ this.data }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logExtended() { | ||
// @if CK_DEBUG_ENGINE // console.log( `ModelText: ${ this }, attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelText: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -12,2 +12,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { convertMapToStringifiedObject } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -271,2 +273,15 @@ * `TextProxy` represents a part of {@link module:engine/model/text~Text text node}. | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `#${ this.data }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ModelTextProxy: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logExtended() { | ||
// @if CK_DEBUG_ENGINE // console.log( `ModelTextProxy: ${ this }, ` + | ||
// @if CK_DEBUG_ENGINE // `attrs: ${ convertMapToStringifiedObject( this.getAttributes() ) }` ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -26,3 +26,2 @@ /** | ||
* Selection of which the content should be deleted. | ||
* @param {module:engine/model/batch~Batch} batch Batch to which the operations will be added. | ||
* @param {Object} [options] | ||
@@ -29,0 +28,0 @@ * @param {Boolean} [options.leaveUnmerged=false] Whether to merge elements after removing the content of the selection. |
@@ -15,2 +15,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { logDocument } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -189,2 +191,6 @@ * Document class creates an abstract layer over the content editable area, contains a tree of view elements and | ||
*/ | ||
// @if CK_DEBUG_ENGINE // log( version ) { | ||
// @if CK_DEBUG_ENGINE // logDocument( this, version ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -191,0 +197,0 @@ |
@@ -213,2 +213,22 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // printTree() { | ||
// @if CK_DEBUG_ENGINE // let string = 'ViewDocumentFragment: ['; | ||
// @if CK_DEBUG_ENGINE // for ( const child of this.getChildren() ) { | ||
// @if CK_DEBUG_ENGINE // if ( child.is( 'text' ) ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + '\t'.repeat( 1 ) + child.data; | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + child.printTree( 1 ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // string += '\n]'; | ||
// @if CK_DEBUG_ENGINE // return string; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logTree() { | ||
// @if CK_DEBUG_ENGINE // console.log( this.printTree() ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -215,0 +235,0 @@ |
@@ -810,2 +810,4 @@ /** | ||
* | ||
* **Note:** A special case in the `'nbsp'` mode exists where the `<br>` in `<p><br></p>` is treated as a block filler. | ||
* | ||
* @param {Node} domNode DOM node to check. | ||
@@ -815,3 +817,13 @@ * @returns {Boolean} True if a node is considered a block filler for given mode. | ||
isBlockFiller( domNode ) { | ||
return this.blockFillerMode == 'br' ? domNode.isEqualNode( BR_FILLER_REF ) : isNbspBlockFiller( domNode, this.blockElements ); | ||
if ( this.blockFillerMode == 'br' ) { | ||
return domNode.isEqualNode( BR_FILLER_REF ); | ||
} | ||
// Special case for <p><br></p> in which case the <br> should be treated as filler even | ||
// when we're in the 'nbsp' mode. See ckeditor5#5564. | ||
if ( domNode.tagName === 'BR' && hasBlockParent( domNode, this.blockElements ) && domNode.parentNode.childNodes.length === 1 ) { | ||
return true; | ||
} | ||
return isNbspBlockFiller( domNode, this.blockElements ); | ||
} | ||
@@ -818,0 +830,0 @@ |
@@ -18,2 +18,4 @@ /** | ||
// @if CK_DEBUG_ENGINE // const { convertMapToTags } = require( '../dev-utils/utils' ); | ||
/** | ||
@@ -776,2 +778,28 @@ * View element. | ||
*/ | ||
// @if CK_DEBUG_ENGINE // printTree( level = 0) { | ||
// @if CK_DEBUG_ENGINE // let string = ''; | ||
// @if CK_DEBUG_ENGINE // string += '\t'.repeat( level ) + `<${ this.name }${ convertMapToTags( this.getAttributes() ) }>`; | ||
// @if CK_DEBUG_ENGINE // for ( const child of this.getChildren() ) { | ||
// @if CK_DEBUG_ENGINE // if ( child.is( 'text' ) ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + '\t'.repeat( level + 1 ) + child.data; | ||
// @if CK_DEBUG_ENGINE // } else { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + child.printTree( level + 1 ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // if ( this.childCount ) { | ||
// @if CK_DEBUG_ENGINE // string += '\n' + '\t'.repeat( level ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // string += `</${ this.name }>`; | ||
// @if CK_DEBUG_ENGINE // return string; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logTree() { | ||
// @if CK_DEBUG_ENGINE // console.log( this.printTree() ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} | ||
@@ -778,0 +806,0 @@ |
@@ -130,2 +130,14 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `#${ this.data }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ViewText: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logExtended() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ViewText: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -182,2 +182,14 @@ /** | ||
} | ||
// @if CK_DEBUG_ENGINE // toString() { | ||
// @if CK_DEBUG_ENGINE // return `#${ this.data }`; | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // log() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ViewTextProxy: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
// @if CK_DEBUG_ENGINE // logExtended() { | ||
// @if CK_DEBUG_ENGINE // console.log( 'ViewTextProxy: ' + this ); | ||
// @if CK_DEBUG_ENGINE // } | ||
} |
@@ -484,2 +484,4 @@ /** | ||
} catch ( err ) { | ||
// @if CK_DEBUG // throw err; | ||
/* istanbul ignore next */ | ||
CKEditorError.rethrowUnexpectedError( err, this ); | ||
@@ -486,0 +488,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1633739
20
36811
+ Added@ckeditor/ckeditor5-utils@16.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@15.0.0(transitive)
- Removedckeditor5@15.0.0(transitive)