@ckeditor/ckeditor5-page-break
Advanced tools
Comparing version 21.0.0 to 22.0.0
{ | ||
"name": "@ckeditor/ckeditor5-page-break", | ||
"version": "21.0.0", | ||
"version": "22.0.0", | ||
"description": "Page break feature for CKEditor 5.", | ||
@@ -13,14 +13,14 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^21.0.0", | ||
"@ckeditor/ckeditor5-ui": "^21.0.0", | ||
"@ckeditor/ckeditor5-widget": "^21.0.0" | ||
"@ckeditor/ckeditor5-core": "^22.0.0", | ||
"@ckeditor/ckeditor5-ui": "^22.0.0", | ||
"@ckeditor/ckeditor5-widget": "^22.0.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-cloud-services": "^21.0.0", | ||
"@ckeditor/ckeditor5-engine": "^21.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^21.0.0", | ||
"@ckeditor/ckeditor5-easy-image": "^21.0.0", | ||
"@ckeditor/ckeditor5-image": "^21.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^21.0.0", | ||
"@ckeditor/ckeditor5-utils": "^21.0.0" | ||
"@ckeditor/ckeditor5-cloud-services": "^22.0.0", | ||
"@ckeditor/ckeditor5-engine": "^22.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^22.0.0", | ||
"@ckeditor/ckeditor5-easy-image": "^22.0.0", | ||
"@ckeditor/ckeditor5-image": "^22.0.0", | ||
"@ckeditor/ckeditor5-paragraph": "^22.0.0", | ||
"@ckeditor/ckeditor5-utils": "^22.0.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "engines": { |
@@ -45,4 +45,4 @@ /** | ||
model: 'pageBreak', | ||
view: ( modelElement, viewWriter ) => { | ||
const divElement = viewWriter.createContainerElement( 'div', { | ||
view: ( modelElement, { writer } ) => { | ||
const divElement = writer.createContainerElement( 'div', { | ||
class: 'page-break', | ||
@@ -55,7 +55,7 @@ // If user has no `.ck-content` styles, it should always break a page during print. | ||
// https://github.com/ckeditor/ckeditor5-page-break/pull/1#discussion_r328934062. | ||
const spanElement = viewWriter.createContainerElement( 'span', { | ||
const spanElement = writer.createContainerElement( 'span', { | ||
style: 'display: none' | ||
} ); | ||
viewWriter.insert( viewWriter.createPositionAt( divElement, 0 ), spanElement ); | ||
writer.insert( writer.createPositionAt( divElement, 0 ), spanElement ); | ||
@@ -68,17 +68,17 @@ return divElement; | ||
model: 'pageBreak', | ||
view: ( modelElement, viewWriter ) => { | ||
view: ( modelElement, { writer } ) => { | ||
const label = t( 'Page break' ); | ||
const viewWrapper = viewWriter.createContainerElement( 'div' ); | ||
const viewLabelElement = viewWriter.createContainerElement( 'span' ); | ||
const innerText = viewWriter.createText( t( 'Page break' ) ); | ||
const viewWrapper = writer.createContainerElement( 'div' ); | ||
const viewLabelElement = writer.createContainerElement( 'span' ); | ||
const innerText = writer.createText( t( 'Page break' ) ); | ||
viewWriter.addClass( 'page-break', viewWrapper ); | ||
viewWriter.setCustomProperty( 'pageBreak', true, viewWrapper ); | ||
writer.addClass( 'page-break', viewWrapper ); | ||
writer.setCustomProperty( 'pageBreak', true, viewWrapper ); | ||
viewWriter.addClass( 'page-break__label', viewLabelElement ); | ||
writer.addClass( 'page-break__label', viewLabelElement ); | ||
viewWriter.insert( viewWriter.createPositionAt( viewWrapper, 0 ), viewLabelElement ); | ||
viewWriter.insert( viewWriter.createPositionAt( viewLabelElement, 0 ), innerText ); | ||
writer.insert( writer.createPositionAt( viewWrapper, 0 ), viewLabelElement ); | ||
writer.insert( writer.createPositionAt( viewLabelElement, 0 ), innerText ); | ||
return toPageBreakWidget( viewWrapper, viewWriter, label ); | ||
return toPageBreakWidget( viewWrapper, writer, label ); | ||
} | ||
@@ -85,0 +85,0 @@ } ); |
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
43653
43
+ Added@ckeditor/ckeditor5-core@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-engine@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-typing@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-ui@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-utils@22.0.0(transitive)
+ Added@ckeditor/ckeditor5-widget@22.0.0(transitive)
- Removed@ckeditor/ckeditor5-core@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-engine@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-typing@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-ui@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-utils@21.0.0(transitive)
- Removed@ckeditor/ckeditor5-widget@21.0.0(transitive)