Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-widget

Package Overview
Dependencies
Maintainers
1
Versions
703
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-widget - npm Package Compare versions

Comparing version 1.0.0-beta.1 to 1.0.0-beta.2

15

CHANGELOG.md
Changelog
=========
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-widget/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018-04-10)
### Bug fixes
* Replaced nested editable's `.ck-editable` class with `.ck-editor__editable` + `.ck-editor__nested-editable` to stop Grammarly throwing errors. Closes [ckeditor/ckeditor5#578](https://github.com/ckeditor/ckeditor5/issues/578). ([051b326](https://github.com/ckeditor/ckeditor5-widget/commit/051b326))
### Other changes
* Increased the specificity of CSS rules. Introduced the .ck class for editor UI components (see: [ckeditor/ckeditor5#494](https://github.com/ckeditor/ckeditor5/issues/494)). ([abc7def](https://github.com/ckeditor/ckeditor5-widget/commit/abc7def))
### BREAKING CHANGES
* The `.ck-editable` class is no longer available. Use the `.ck-editor__nested-editable` class instead.
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-widget/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15)

@@ -5,0 +20,0 @@

16

package.json
{
"name": "@ckeditor/ckeditor5-widget",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "Widget API for CKEditor 5.",

@@ -10,13 +10,13 @@ "keywords": [

"dependencies": {
"@ckeditor/ckeditor5-core": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-engine": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-utils": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-beta.1"
"@ckeditor/ckeditor5-core": "^1.0.0-beta.2",
"@ckeditor/ckeditor5-engine": "^1.0.0-beta.2",
"@ckeditor/ckeditor5-utils": "^1.0.0-beta.2",
"@ckeditor/ckeditor5-theme-lark": "^1.0.0-beta.2"
},
"devDependencies": {
"@ckeditor/ckeditor5-typing": "^1.0.0-beta.1",
"@ckeditor/ckeditor5-typing": "^1.0.0-beta.2",
"eslint": "^4.15.0",
"eslint-config-ckeditor5": "^1.0.7",
"husky": "^0.14.3",
"lint-staged": "^6.0.0"
"lint-staged": "^7.0.0"
},

@@ -29,3 +29,3 @@ "engines": {

"license": "(GPL-2.0 OR LGPL-2.1 OR MPL-1.1)",
"homepage": "https://ckeditor5.github.io",
"homepage": "https://ckeditor.com",
"bugs": "https://github.com/ckeditor/ckeditor5-widget/issues",

@@ -32,0 +32,0 @@ "repository": {

@@ -17,3 +17,3 @@ CKEditor 5 widget API

See the [`@ckeditor/ckeditor5-widget` package](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/api/widget.html) page in [CKEditor 5 documentation](https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/).
See the [`@ckeditor/ckeditor5-widget` package](https://docs.ckeditor.com/ckeditor5/latest/api/widget.html) page in [CKEditor 5 documentation](https://docs.ckeditor.com/ckeditor5/latest/).

@@ -20,0 +20,0 @@ ## License

@@ -138,3 +138,3 @@ /**

function compareDescriptors( a, b ) {
return a && b && a.priority == b.priority && classesToString( a.class ) == classesToString( b.class );
return a && b && a.priority == b.priority && classesToString( a.classes ) == classesToString( b.classes );
}

@@ -155,3 +155,3 @@

// When priorities are equal and names are different - use classes to compare.
return classesToString( a.class ) > classesToString( b.class );
return classesToString( a.classes ) > classesToString( b.classes );
}

@@ -158,0 +158,0 @@

@@ -67,4 +67,4 @@ /**

writer,
( element, descriptor, writer ) => writer.addClass( normalizeToArray( descriptor.class ), element ),
( element, descriptor, writer ) => writer.removeClass( normalizeToArray( descriptor.class ), element )
( element, descriptor, writer ) => writer.addClass( normalizeToArray( descriptor.classes ), element ),
( element, descriptor, writer ) => writer.removeClass( normalizeToArray( descriptor.classes ), element )
);

@@ -113,3 +113,3 @@

* @param {String|Function} labelOrCreator
* * @param {module:engine/view/writer~Writer} writer
* @param {module:engine/view/writer~Writer} writer
*/

@@ -138,12 +138,13 @@ export function setLabel( element, labelOrCreator, writer ) {

* Adds functionality to provided {module:engine/view/editableelement~EditableElement} to act as a widget's editable:
* * adds `ck-editable` CSS class,
* * adds `ck-editor__editable` and `ck-editor__nested-editable` CSS classes,
* * sets `contenteditable` as `true` when {module:engine/view/editableelement~EditableElement#isReadOnly} is `false`
* otherwise set `false`,
* * adds `ck-editable_focused` CSS class when editable is focused and removes it when it's blurred.
* * adds `ck-editor__nested-editable_focused` CSS class when editable is focused and removes it when it's blurred.
*
* @param {module:engine/view/editableelement~EditableElement} editable
* @param {module:engine/view/writer~Writer} writer
* @returns {module:engine/view/editableelement~EditableElement} Returns same element that was provided in `editable` param.
*/
export function toWidgetEditable( editable, writer ) {
writer.addClass( 'ck-editable', editable );
writer.addClass( [ 'ck-editor__editable', 'ck-editor__nested-editable' ], editable );

@@ -160,5 +161,5 @@ // Set initial contenteditable value.

if ( is ) {
writer.addClass( 'ck-editable_focused', editable );
writer.addClass( 'ck-editor__nested-editable_focused', editable );
} else {
writer.removeClass( 'ck-editable_focused', editable );
writer.removeClass( 'ck-editor__nested-editable_focused', editable );
}

@@ -165,0 +166,0 @@ } );

@@ -136,5 +136,3 @@ /**

editor.model.change( () => {
this._setSelectionOverElement( modelElement );
} );
this._setSelectionOverElement( modelElement );
}

@@ -246,5 +244,3 @@

if ( objectElement2 instanceof ModelElement && schema.isObject( objectElement2 ) ) {
model.change( () => {
this._setSelectionOverElement( objectElement2 );
} );
this._setSelectionOverElement( objectElement2 );

@@ -251,0 +247,0 @@ return true;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc