From 6aff5521c234474b78f82c00b606a453a246dbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kwa=C5=9Bnik?= Date: Mon, 23 Nov 2020 22:14:11 +0100 Subject: [PATCH] Changing new line separator to '-'; --- docs/builds/guides/migrate.md | 2 +- .../ckeditor5-build-decoupled-document/src/ckeditor.js | 2 +- packages/ckeditor5-core/src/editor/editorconfig.jsdoc | 8 ++++---- .../docs/_snippets/features/paste-from-office.js | 3 ++- packages/ckeditor5-ui/src/toolbar/toolbarview.js | 2 +- packages/ckeditor5-ui/tests/toolbar/toolbarview.js | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/builds/guides/migrate.md b/docs/builds/guides/migrate.md index 9401cf030b1..5bf456faa21 100644 --- a/docs/builds/guides/migrate.md +++ b/docs/builds/guides/migrate.md @@ -648,7 +648,7 @@ Note: The number of options was reduced on purpose. We understood that configuri toolbarGroupCycling
toolbarGroups - N/A. {@link module:core/editor/editorconfig~EditorConfig#toolbar Toolbar buttons can be grouped} by using '|' as a separator or divided into multiple lines using '/' as a separator. + N/A. {@link module:core/editor/editorconfig~EditorConfig#toolbar Toolbar buttons can be grouped} by using '|' as a separator or divided into multiple lines using '-' as a separator. toolbarLocation diff --git a/packages/ckeditor5-build-decoupled-document/src/ckeditor.js b/packages/ckeditor5-build-decoupled-document/src/ckeditor.js index 4a78f48e2f3..08319f5f46b 100644 --- a/packages/ckeditor5-build-decoupled-document/src/ckeditor.js +++ b/packages/ckeditor5-build-decoupled-document/src/ckeditor.js @@ -108,7 +108,7 @@ DecoupledEditor.defaultConfig = { '|', 'undo', 'redo', - '/', + '-', 'alignment:left', 'alignment:right', 'alignment:center', diff --git a/packages/ckeditor5-core/src/editor/editorconfig.jsdoc b/packages/ckeditor5-core/src/editor/editorconfig.jsdoc index ac444d723e1..3fa56cd8e3b 100644 --- a/packages/ckeditor5-core/src/editor/editorconfig.jsdoc +++ b/packages/ckeditor5-core/src/editor/editorconfig.jsdoc @@ -135,14 +135,14 @@ * Simple format (specifies only toolbar items): * * const config = { - * toolbar: [ 'bold', 'italic', '|', 'undo', 'redo', '/', 'numberedList', 'bulletedList' ] + * toolbar: [ 'bold', 'italic', '|', 'undo', 'redo', '-', 'numberedList', 'bulletedList' ] * }; * * Extended format: * * const config = { * toolbar: { - * items: [ 'bold', 'italic', '|', 'undo', 'redo', '/', 'numberedList', 'bulletedList' ], + * items: [ 'bold', 'italic', '|', 'undo', 'redo', '-', 'numberedList', 'bulletedList' ], * * viewportTopOffset: 30, * @@ -161,9 +161,9 @@ * * toolbar: [ 'bold', 'italic', '|', 'undo', 'redo' ] * - * or `'/'` to make a line break, so toolbar will become multiline: + * or `'-'` to make a line break, so toolbar will become multi-line: * - * toolbar: [ 'bold', 'italic', '/ ', 'undo', 'redo' ] + * toolbar: [ 'bold', 'italic', '-', 'undo', 'redo' ] * * * **`toolbar.viewportTopOffset`** – The offset (in pixels) from the top of the viewport used when positioning a sticky toolbar. * Useful when a page with which the editor is being integrated has some other sticky or fixed elements diff --git a/packages/ckeditor5-paste-from-office/docs/_snippets/features/paste-from-office.js b/packages/ckeditor5-paste-from-office/docs/_snippets/features/paste-from-office.js index b0d4189bf2a..3edfee177a8 100644 --- a/packages/ckeditor5-paste-from-office/docs/_snippets/features/paste-from-office.js +++ b/packages/ckeditor5-paste-from-office/docs/_snippets/features/paste-from-office.js @@ -22,6 +22,7 @@ ClassicEditor 'bold', 'italic', 'underline', + 'strikethrough', '|', 'alignment', '|', @@ -34,11 +35,11 @@ ClassicEditor 'link', 'imageUpload', 'insertTable', + 'horizontalLine', '|', 'undo', 'redo' ], - shouldNotGroupWhenFull: true, viewportTopOffset: window.getViewportTopOffsetConfig() }, image: { diff --git a/packages/ckeditor5-ui/src/toolbar/toolbarview.js b/packages/ckeditor5-ui/src/toolbar/toolbarview.js index 9aec69334e0..eb0e2391877 100644 --- a/packages/ckeditor5-ui/src/toolbar/toolbarview.js +++ b/packages/ckeditor5-ui/src/toolbar/toolbarview.js @@ -288,7 +288,7 @@ export default class ToolbarView extends View { this.items.addMany( config.map( name => { if ( name == '|' ) { return new ToolbarSeparatorView(); - } else if ( name == '/' ) { + } else if ( name == '-' ) { if ( this.options.shouldGroupWhenFull ) { /** * Toolbar line break will work only when button grouping is disabled in the toolbar config: diff --git a/packages/ckeditor5-ui/tests/toolbar/toolbarview.js b/packages/ckeditor5-ui/tests/toolbar/toolbarview.js index 5cd1c8fd483..50c897b783f 100644 --- a/packages/ckeditor5-ui/tests/toolbar/toolbarview.js +++ b/packages/ckeditor5-ui/tests/toolbar/toolbarview.js @@ -409,7 +409,7 @@ describe( 'ToolbarView', () => { } ); it( 'expands the config into collection', () => { - view.fillFromConfig( [ 'foo', '/', 'bar', '|', 'foo' ], factory ); + view.fillFromConfig( [ 'foo', '-', 'bar', '|', 'foo' ], factory ); const items = view.items; @@ -443,7 +443,7 @@ describe( 'ToolbarView', () => { const consoleWarnStub = sinon.stub( console, 'warn' ); view.options.shouldGroupWhenFull = true; - view.fillFromConfig( [ 'foo', '/', 'bar' ], factory ); + view.fillFromConfig( [ 'foo', '-', 'bar' ], factory ); sinon.assert.calledOnce( consoleWarnStub ); sinon.assert.calledWithExactly( consoleWarnStub,