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

@ckeditor/ckeditor5-link

Package Overview
Dependencies
Maintainers
1
Versions
709
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-link - npm Package Compare versions

Comparing version 10.0.4 to 10.1.0

lang/translations/vi.po

12

CHANGELOG.md
Changelog
=========
## [10.1.0](https://github.com/ckeditor/ckeditor5-link/compare/v10.0.4...v10.1.0) (2018-12-05)
### Features
* Improved responsiveness of the form and actions views in narrow viewports (see [ckeditor/ckeditor5#416](https://github.com/ckeditor/ckeditor5/issues/416)). ([74dbe69](https://github.com/ckeditor/ckeditor5-link/commit/74dbe69))
### Other changes
* Improved SVG icons size. See [ckeditor/ckeditor5-theme-lark#206](https://github.com/ckeditor/ckeditor5-theme-lark/issues/206). ([5b12f81](https://github.com/ckeditor/ckeditor5-link/commit/5b12f81))
* Updated translations. ([9d7b042](https://github.com/ckeditor/ckeditor5-link/commit/9d7b042)) ([6ac7e41](https://github.com/ckeditor/ckeditor5-link/commit/6ac7e41))
## [10.0.4](https://github.com/ckeditor/ckeditor5-link/compare/v10.0.3...v10.0.4) (2018-10-08)

@@ -5,0 +17,0 @@

24

package.json
{
"name": "@ckeditor/ckeditor5-link",
"version": "10.0.4",
"version": "10.1.0",
"description": "Link feature for CKEditor 5.",

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

"dependencies": {
"@ckeditor/ckeditor5-core": "^11.0.1",
"@ckeditor/ckeditor5-engine": "^11.0.0",
"@ckeditor/ckeditor5-theme-lark": "^11.1.0",
"@ckeditor/ckeditor5-ui": "^11.1.0"
"@ckeditor/ckeditor5-core": "^11.1.0",
"@ckeditor/ckeditor5-engine": "^12.0.0",
"@ckeditor/ckeditor5-theme-lark": "^12.0.0",
"@ckeditor/ckeditor5-ui": "^11.2.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-editor-classic": "^11.0.1",
"@ckeditor/ckeditor5-enter": "^10.1.2",
"@ckeditor/ckeditor5-heading": "^10.1.0",
"@ckeditor/ckeditor5-paragraph": "^10.0.3",
"@ckeditor/ckeditor5-typing": "^11.0.1",
"@ckeditor/ckeditor5-undo": "^10.0.3",
"@ckeditor/ckeditor5-utils": "^11.0.0",
"@ckeditor/ckeditor5-editor-classic": "^11.0.2",
"@ckeditor/ckeditor5-enter": "^10.1.3",
"@ckeditor/ckeditor5-heading": "^10.1.1",
"@ckeditor/ckeditor5-paragraph": "^10.0.4",
"@ckeditor/ckeditor5-typing": "^11.0.2",
"@ckeditor/ckeditor5-undo": "^10.0.4",
"@ckeditor/ckeditor5-utils": "^11.1.0",
"eslint": "^5.5.0",

@@ -28,0 +28,0 @@ "eslint-config-ckeditor5": "^1.0.7",

@@ -13,3 +13,3 @@ CKEditor 5 link feature

This package implements the link feature for CKEditor 5.
This package implements the link feature for CKEditor 5. It allows for inserting hyperlinks into the edited content and offers the UI to create and edit them.

@@ -16,0 +16,0 @@ ## Documentation

@@ -10,5 +10,2 @@ /**

import Range from '@ckeditor/ckeditor5-engine/src/model/range';
import Position from '@ckeditor/ckeditor5-engine/src/model/position';
/**

@@ -24,4 +21,4 @@ * Returns a range containing the entire link in which the given `position` is placed.

*/
export default function findLinkRange( position, value ) {
return new Range( _findBound( position, value, true ), _findBound( position, value, false ) );
export default function findLinkRange( position, value, model ) {
return model.createRange( _findBound( position, value, true, model ), _findBound( position, value, false, model ) );
}

@@ -36,3 +33,3 @@

// @returns {module:engine/model/position~Position} The position just before the last matched node.
function _findBound( position, value, lookBack ) {
function _findBound( position, value, lookBack, model ) {
// Get node before or after position (depends on `lookBack` flag).

@@ -49,3 +46,3 @@ // When position is inside text node then start searching from text node.

return lastNode ? Position.createAt( lastNode, lookBack ? 'before' : 'after' ) : position;
return lastNode ? model.createPositionAt( lastNode, lookBack ? 'before' : 'after' ) : position;
}

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

import Command from '@ckeditor/ckeditor5-core/src/command';
import Range from '@ckeditor/ckeditor5-engine/src/model/range';
import findLinkRange from './findlinkrange';

@@ -69,3 +68,3 @@ import toMap from '@ckeditor/ckeditor5-utils/src/tomap';

// Then update `linkHref` value.
const linkRange = findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ) );
const linkRange = findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ), model );

@@ -90,3 +89,3 @@ writer.setAttribute( 'linkHref', href, linkRange );

// Create new range wrapping created node.
writer.setSelection( Range.createOn( node ) );
writer.setSelection( writer.createRangeOn( node ) );
}

@@ -93,0 +92,0 @@ } else {

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

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import {
downcastAttributeToElement
} from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
import { downcastAttributeToElement } from '@ckeditor/ckeditor5-engine/src/conversion/downcast-converters';
import { upcastElementToAttribute } from '@ckeditor/ckeditor5-engine/src/conversion/upcast-converters';

@@ -100,3 +98,3 @@ import LinkCommand from './linkcommand';

if ( selection.hasAttribute( 'linkHref' ) ) {
const modelRange = findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ) );
const modelRange = findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ), editor.model );
const viewRange = editor.editing.mapper.toViewRange( modelRange );

@@ -103,0 +101,0 @@

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

import ClickObserver from '@ckeditor/ckeditor5-engine/src/view/observer/clickobserver';
import Range from '@ckeditor/ckeditor5-engine/src/view/range';
import { isLinkElement } from './utils';

@@ -519,3 +518,4 @@ import ContextualBalloon from '@ckeditor/ckeditor5-ui/src/panel/balloon/contextualballoon';

_getSelectedLinkElement() {
const selection = this.editor.editing.view.document.selection;
const view = this.editor.editing.view;
const selection = view.document.selection;

@@ -536,3 +536,3 @@ if ( selection.isCollapsed ) {

// Check if the link element is fully selected.
if ( Range.createIn( startLink ).getTrimmed().isEqual( range ) ) {
if ( view.createRangeIn( startLink ).getTrimmed().isEqual( range ) ) {
return startLink;

@@ -539,0 +539,0 @@ } else {

@@ -41,3 +41,3 @@ /**

const rangesToUnlink = selection.isCollapsed ?
[ findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ) ) ] : selection.getRanges();
[ findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ), model ) ] : selection.getRanges();

@@ -44,0 +44,0 @@ // Remove `linkHref` attribute from specified ranges.

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