@ckeditor/ckeditor5-editor-classic
Advanced tools
Comparing version 0.8.0 to 1.0.0-alpha.1
Changelog | ||
========= | ||
## [1.0.0-alpha.1](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.8.0...v1.0.0-alpha.1) (2017-10-03) | ||
### Features | ||
* The `StickyToolbarView` has been replaced by the `StickyPanelView` with a child `ToolbarView` (see [ckeditor/ckeditor5-ui#297](https://github.com/ckeditor/ckeditor5-ui/issues/297)). ([e4f591f](https://github.com/ckeditor/ckeditor5-editor-classic/commit/e4f591f)) | ||
### BREAKING CHANGES | ||
* The former attributes controling the position of the toolbar provided by the `StickyToolbarView` are now available under `ClassicEditorUIView#stickyPanel` (`editor.ui.view.stickyPanel`). | ||
## [0.8.0](https://github.com/ckeditor/ckeditor5-editor-classic/compare/v0.7.3...v0.8.0) (2017-09-03) | ||
@@ -5,0 +16,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-editor-classic", | ||
"version": "0.8.0", | ||
"description": "Classic Editor for CKEditor 5.", | ||
"keywords": [], | ||
"version": "1.0.0-alpha.1", | ||
"description": "Classic editor implementation for CKEditor 5.", | ||
"keywords": [ | ||
"ckeditor5", | ||
"ckeditor5-editor" | ||
], | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^0.9.0", | ||
"@ckeditor/ckeditor5-engine": "^0.11.0", | ||
"@ckeditor/ckeditor5-theme-lark": "^0.9.0", | ||
"@ckeditor/ckeditor5-ui": "^0.10.0", | ||
"@ckeditor/ckeditor5-utils": "^0.10.0" | ||
"@ckeditor/ckeditor5-core": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-engine": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-ui": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-utils": "^1.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-dev-lint": "^3.1.0", | ||
"@ckeditor/ckeditor5-basic-styles": "^0.9.0", | ||
"@ckeditor/ckeditor5-enter": "^0.10.0", | ||
"@ckeditor/ckeditor5-heading": "^0.10.0", | ||
"@ckeditor/ckeditor5-paragraph": "^0.9.0", | ||
"@ckeditor/ckeditor5-undo": "^0.9.0", | ||
"@ckeditor/ckeditor5-typing": "^0.10.0", | ||
"eslint-config-ckeditor5": "^1.0.5", | ||
"@ckeditor/ckeditor5-dev-lint": "^3.1.4", | ||
"@ckeditor/ckeditor5-basic-styles": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-enter": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-heading": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-undo": "^1.0.0-alpha.1", | ||
"@ckeditor/ckeditor5-typing": "^1.0.0-alpha.1", | ||
"eslint-config-ckeditor5": "^1.0.6", | ||
"gulp": "^3.9.1", | ||
@@ -36,3 +39,8 @@ "guppy-pre-commit": "^0.4.0" | ||
"url": "https://github.com/ckeditor/ckeditor5-editor-classic.git" | ||
} | ||
}, | ||
"files": [ | ||
"lang", | ||
"src", | ||
"theme" | ||
] | ||
} |
@@ -1,2 +0,2 @@ | ||
CKEditor 5 classic editor creator | ||
CKEditor 5 classic editor implementation | ||
======================================== | ||
@@ -11,6 +11,14 @@ | ||
The classic editor implementation. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-editor-classic>. | ||
The classic editor implementation for CKEditor 5. | ||
This package contains the [`ClassicEditor`](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/module_editor-classic_classiceditor-ClassicEditor.html) class. Follow there to learn more about this type of editor and how to initialize it. | ||
This package contains the source version of the classic editor. This editor implementation is also available in the [classic build](https://www.npmjs.com/package/@ckeditor/ckeditor5-build-classic). Read more about [CKEditor 5 Builds](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/builds/index.html). | ||
## Documentation | ||
See the [`@ckeditor/ckeditor5-editor-classic` package](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/editor-classic.html) page in [CKEditor 5 documentation](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/). | ||
## License | ||
Licensed under the GPL, LGPL and MPL licenses, at your choice. For full details about the license, please check the `LICENSE.md` file. |
@@ -19,5 +19,23 @@ /** | ||
/** | ||
* Classic editor. Uses an inline editable and a sticky toolbar, all | ||
* enclosed in a boxed UI. | ||
* The {@glink builds/guides/overview#Classic-editor classic editor} implementation. | ||
* It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI. | ||
* See the {@glink examples/builds/classic-editor demo}. | ||
* | ||
* In order to create a classic editor instance, use the static | ||
* {@link module:editor-classic/classiceditor~ClassicEditor#create `ClassicEditor.create()`} method. | ||
* | ||
* # Classic editor and classic build | ||
* | ||
* The classic editor can be used directly from source (if you installed the | ||
* [`@ckeditor/ckeditor5-editor-classic`](https://www.npmjs.com/package/@ckeditor/ckeditor5-editor-classic) package) | ||
* but it is also available in the {@glink builds/guides/overview#Classic-editor classic build}. | ||
* | ||
* {@glink builds/guides/overview Builds} are ready-to-use editors with plugins bundled in. When using the editor from | ||
* source you need to take care of loading all plugins by yourself | ||
* (through the {@link module:core/editor/editorconfig~EditorConfig#plugins `config.plugins`} option). | ||
* Using the editor from source gives much better flexibility and allows easier customization. | ||
* | ||
* Read more about initializing the editor from source or as a build in | ||
* {@link module:editor-classic/classiceditor~ClassicEditor#create `ClassicEditor.create()`}. | ||
* | ||
* @extends module:core/editor/standardeditor~StandardEditor | ||
@@ -29,5 +47,9 @@ */ | ||
* | ||
* **Note:** do not use the constructor to create editor instances. Use the static | ||
* {@link module:editor-classic/classiceditor~ClassicEditor#create `ClassicEditor.create()`} method instead. | ||
* | ||
* @protected | ||
* @param {HTMLElement} element The DOM element that will be the source for the created editor. | ||
* The data will be loaded from it and loaded back to it once the editor is destroyed. | ||
* @param {Object} config The editor configuration. | ||
* @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration. | ||
*/ | ||
@@ -68,17 +90,38 @@ constructor( element, config ) { | ||
* | ||
* ClassicEditor.create( document.querySelector( '#editor' ), { | ||
* plugins: [ Delete, Enter, Typing, Paragraph, Undo, Bold, Italic ], | ||
* toolbar: [ 'bold', 'italic', 'undo', 'redo' ] | ||
* } ) | ||
* .then( editor => { | ||
* console.log( 'Editor was initialized', editor ); | ||
* } ) | ||
* .catch( err => { | ||
* console.error( err.stack ); | ||
* } ); | ||
* Creating instance when using {@glink builds/index CKEditor build}: | ||
* | ||
* @param {HTMLElement} element See {@link module:editor-classic/classiceditor~ClassicEditor#constructor}'s parameters. | ||
* @param {Object} config See {@link module:editor-classic/classiceditor~ClassicEditor#constructor}'s parameters. | ||
* ClassicEditor | ||
* .create( document.querySelector( '#editor' ) ) | ||
* .then( editor => { | ||
* console.log( 'Editor was initialized', editor ); | ||
* } ) | ||
* .catch( err => { | ||
* console.error( err.stack ); | ||
* } ); | ||
* | ||
* Creating instance when using CKEditor from source (make sure to specify the list of plugins to load and the toolbar): | ||
* | ||
* import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; | ||
* import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials'; | ||
* import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold'; | ||
* import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic'; | ||
* import ... | ||
* | ||
* ClassicEditor | ||
* .create( document.querySelector( '#editor' ), { | ||
* plugins: [ Essentials, Bold, Italic, ... ], | ||
* toolbar: [ 'bold', 'italic', ... ] | ||
* } ) | ||
* .then( editor => { | ||
* console.log( 'Editor was initialized', editor ); | ||
* } ) | ||
* .catch( err => { | ||
* console.error( err.stack ); | ||
* } ); | ||
* | ||
* @param {HTMLElement} element The DOM element that will be the source for the created editor. | ||
* The data will be loaded from it and loaded back to it once the editor is destroyed. | ||
* @param {module:core/editor/editorconfig~EditorConfig} config The editor configuration. | ||
* @returns {Promise} A promise resolved once the editor is ready. | ||
* @returns {module:core/editor/standardeditor~StandardEditor} return.editor The editor instance. | ||
* The promise returns the created {@link module:editor-classic/classiceditor~ClassicEditor} instance. | ||
*/ | ||
@@ -85,0 +128,0 @@ static create( element, config ) { |
@@ -60,8 +60,8 @@ /** | ||
// Set–up the toolbar. | ||
view.toolbar.bind( 'isActive' ).to( this.focusTracker, 'isFocused' ); | ||
view.toolbar.limiterElement = view.element; | ||
// Set–up the sticky panel with toolbar. | ||
view.stickyPanel.bind( 'isActive' ).to( this.focusTracker, 'isFocused' ); | ||
view.stickyPanel.limiterElement = view.element; | ||
if ( this._toolbarConfig && this._toolbarConfig.viewportTopOffset ) { | ||
view.toolbar.viewportTopOffset = this._toolbarConfig.viewportTopOffset; | ||
view.stickyPanel.viewportTopOffset = this._toolbarConfig.viewportTopOffset; | ||
} | ||
@@ -68,0 +68,0 @@ |
@@ -12,3 +12,4 @@ /** | ||
import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview'; | ||
import StickyToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/sticky/stickytoolbarview'; | ||
import StickyPanelView from '@ckeditor/ckeditor5-ui/src/panel/sticky/stickypanelview'; | ||
import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview'; | ||
import Template from '@ckeditor/ckeditor5-ui/src/template'; | ||
@@ -32,9 +33,18 @@ | ||
/** | ||
* A sticky toolbar view instance. | ||
* Sticky panel view instance. This is a parent view of a {@link #toolbar} | ||
* that makes toolbar sticky. | ||
* | ||
* @readonly | ||
* @member {module:ui/toolbar/sticky/stickytoolbarview~StickyToolbarView} | ||
* @member {module:ui/panel/sticky/stickypanelview~StickyPanelView} | ||
*/ | ||
this.toolbar = new StickyToolbarView( locale ); | ||
this.stickyPanel = new StickyPanelView( locale ); | ||
/** | ||
* Toolbar view instance. | ||
* | ||
* @readonly | ||
* @member {module:ui/toolbar/toolbarview~ToolbarView} | ||
*/ | ||
this.toolbar = new ToolbarView( locale ); | ||
Template.extend( this.toolbar.template, { | ||
@@ -46,2 +56,5 @@ attributes: { | ||
// Set toolbar as a child of a stickyPanel and makes toolbar sticky. | ||
this.stickyPanel.content.add( this.toolbar ); | ||
/** | ||
@@ -55,3 +68,3 @@ * Editable UI view. | ||
this.top.add( this.toolbar ); | ||
this.top.add( this.stickyPanel ); | ||
this.main.add( this.editable ); | ||
@@ -58,0 +71,0 @@ } |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
24
19311
8
287
+ Added@ckeditor/ckeditor5-core@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-engine@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-theme-lark@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-ui@1.0.0-beta.4(transitive)
+ Added@ckeditor/ckeditor5-utils@1.0.0-beta.4(transitive)
- Removed@ckeditor/ckeditor5-core@0.9.0(transitive)
- Removed@ckeditor/ckeditor5-engine@0.11.0(transitive)
- Removed@ckeditor/ckeditor5-theme-lark@0.9.0(transitive)
- Removed@ckeditor/ckeditor5-ui@0.10.0(transitive)
- Removed@ckeditor/ckeditor5-utils@0.10.0(transitive)