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

@ckeditor/ckeditor5-indent

Package Overview
Dependencies
Maintainers
1
Versions
687
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-indent - npm Package Compare versions

Comparing version 16.0.0 to 17.0.0

lang/translations/th.po

11

CHANGELOG.md
Changelog
=========
## [17.0.0](https://github.com/ckeditor/ckeditor5-indent/compare/v16.0.0...v17.0.0) (2020-02-19)
### Bug fixes
* Focus the editor before executing toolbar buttons' command. See [ckeditor/ckeditor5#353](https://github.com/ckeditor/ckeditor5/issues/353). ([ff49482](https://github.com/ckeditor/ckeditor5-indent/commit/ff49482))
### Other changes
* Updated translations. ([f0a7140](https://github.com/ckeditor/ckeditor5-indent/commit/f0a7140))
## [16.0.0](https://github.com/ckeditor/ckeditor5-indent/compare/v15.0.0...v16.0.0) (2019-12-04)

@@ -5,0 +16,0 @@

2

LICENSE.md

@@ -5,3 +5,3 @@ Software License Agreement

**CKEditor 5 Indent Block Feature** – https://github.com/ckeditor/ckeditor5-indent <br>
Copyright (c) 2003-2019, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
Copyright (c) 2003-2020, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.

@@ -8,0 +8,0 @@ Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).

{
"name": "@ckeditor/ckeditor5-indent",
"version": "16.0.0",
"version": "17.0.0",
"description": "Block indentation feature for CKEditor 5.",

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

"dependencies": {
"@ckeditor/ckeditor5-core": "^16.0.0",
"@ckeditor/ckeditor5-utils": "^16.0.0"
"@ckeditor/ckeditor5-core": "^17.0.0",
"@ckeditor/ckeditor5-utils": "^17.0.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-editor-classic": "^16.0.0",
"@ckeditor/ckeditor5-engine": "^16.0.0",
"@ckeditor/ckeditor5-heading": "^16.0.0",
"@ckeditor/ckeditor5-paragraph": "^16.0.0",
"@ckeditor/ckeditor5-ui": "^16.0.0",
"@ckeditor/ckeditor5-editor-classic": "^17.0.0",
"@ckeditor/ckeditor5-engine": "^17.0.0",
"@ckeditor/ckeditor5-heading": "^17.0.0",
"@ckeditor/ckeditor5-paragraph": "^17.0.0",
"@ckeditor/ckeditor5-ui": "^17.0.0",
"eslint": "^5.15.3",

@@ -24,0 +24,0 @@ "eslint-config-ckeditor5": "^2.0.0",

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -4,0 +4,0 @@ */

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -15,2 +15,3 @@ */

import IndentUsingClasses from './indentcommandbehavior/indentusingclasses';
import { addMarginRules } from '@ckeditor/ckeditor5-engine/src/view/styles/margin';

@@ -60,2 +61,3 @@ /**

if ( useOffsetConfig ) {
editor.editing.view.document.addStyleProcessorRules( addMarginRules );
this._setupConversionUsingOffset( editor.conversion );

@@ -117,15 +119,2 @@

// The margin shorthand should also work.
conversion.for( 'upcast' ).attributeToAttribute( {
view: {
styles: {
'margin': /[\s\S]+/
}
},
model: {
key: 'blockIndent',
value: viewElement => normalizeToMarginSideStyle( viewElement.getStyle( 'margin' ), marginProperty )
}
} );
conversion.for( 'downcast' ).attributeToAttribute( {

@@ -171,42 +160,2 @@ model: 'blockIndent',

// Normalizes the margin shorthand value to the value of margin-left or margin-right CSS property.
//
// As such it will return:
//
// - '1em' -> '1em'
// - '2px 1em' -> '1em'
// - '2px 1em 3px' -> '1em'
// - '2px 10px 3px 1em'
// -> '1em' (side "margin-left")
// -> '10px' (side "margin-right")
//
// @param {String} marginStyleValue Margin style value.
// @param {String} side "margin-left" or "margin-right" depending on which margin should be returned.
// @returns {String} Extracted value of margin-left or margin-right.
function normalizeToMarginSideStyle( marginStyleValue, side ) {
// Splits the margin shorthand, ie margin: 2em 4em.
const marginEntries = marginStyleValue.split( ' ' );
let marginValue;
// If only one value defined, ie: `margin: 1px`.
marginValue = marginEntries[ 0 ];
// If only two values defined, ie: `margin: 1px 2px`.
if ( marginEntries[ 1 ] ) {
marginValue = marginEntries[ 1 ];
}
// If four values defined, ie: `margin: 1px 2px 3px 4px`.
if ( marginEntries[ 3 ] ) {
if ( side === 'margin-left' ) {
marginValue = marginEntries[ 3 ];
} else {
marginValue = marginEntries[ 1 ];
}
}
return marginValue;
}
/**

@@ -213,0 +162,0 @@ * The configuration of the {@link module:indent/indentblock~IndentBlock block indentation feature}.

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -4,0 +4,0 @@ */

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -4,0 +4,0 @@ */

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -4,0 +4,0 @@ */

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -4,0 +4,0 @@ */

/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license

@@ -71,3 +71,6 @@ */

this.listenTo( view, 'execute', () => editor.execute( commandName ) );
this.listenTo( view, 'execute', () => {
editor.execute( commandName );
editor.editing.view.focus();
} );

@@ -74,0 +77,0 @@ return view;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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