Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-link

Package Overview
Dependencies
Maintainers
1
Versions
622
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 21.0.0 to 22.0.0

32

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

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

"dependencies": {
"@ckeditor/ckeditor5-clipboard": "^21.0.0",
"@ckeditor/ckeditor5-core": "^21.0.0",
"@ckeditor/ckeditor5-engine": "^21.0.0",
"@ckeditor/ckeditor5-image": "^21.0.0",
"@ckeditor/ckeditor5-typing": "^21.0.0",
"@ckeditor/ckeditor5-ui": "^21.0.0",
"@ckeditor/ckeditor5-utils": "^21.0.0",
"@ckeditor/ckeditor5-clipboard": "^22.0.0",
"@ckeditor/ckeditor5-core": "^22.0.0",
"@ckeditor/ckeditor5-engine": "^22.0.0",
"@ckeditor/ckeditor5-image": "^22.0.0",
"@ckeditor/ckeditor5-typing": "^22.0.0",
"@ckeditor/ckeditor5-ui": "^22.0.0",
"@ckeditor/ckeditor5-utils": "^22.0.0",
"lodash-es": "^4.17.15"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "^21.0.0",
"@ckeditor/ckeditor5-block-quote": "^21.0.0",
"@ckeditor/ckeditor5-code-block": "^21.0.0",
"@ckeditor/ckeditor5-editor-classic": "^21.0.0",
"@ckeditor/ckeditor5-enter": "^21.0.0",
"@ckeditor/ckeditor5-paragraph": "^21.0.0",
"@ckeditor/ckeditor5-theme-lark": "^21.0.0",
"@ckeditor/ckeditor5-undo": "^21.0.0"
"@ckeditor/ckeditor5-basic-styles": "^22.0.0",
"@ckeditor/ckeditor5-block-quote": "^22.0.0",
"@ckeditor/ckeditor5-code-block": "^22.0.0",
"@ckeditor/ckeditor5-editor-classic": "^22.0.0",
"@ckeditor/ckeditor5-enter": "^22.0.0",
"@ckeditor/ckeditor5-paragraph": "^22.0.0",
"@ckeditor/ckeditor5-theme-lark": "^22.0.0",
"@ckeditor/ckeditor5-undo": "^22.0.0"
},

@@ -33,0 +33,0 @@ "engines": {

@@ -56,3 +56,3 @@ /**

/**
* The auto link plugin.
* The autolink plugin.
*

@@ -93,3 +93,3 @@ * @extends module:core/plugin~Plugin

/**
* Enables auto-link on typing.
* Enables autolinking on typing.
*

@@ -102,3 +102,3 @@ * @private

const watcher = new TextWatcher( editor.model, text => {
// 1. Detect "space" after a text with a potential link.
// 1. Detect "Space" after a text with a potential link.
if ( !isSingleSpaceAtTheEnd( text ) ) {

@@ -108,3 +108,3 @@ return;

// 2. Check text before last typed "space".
// 2. Check text before last typed "Space".
const url = getUrlAtTextEnd( text.substr( 0, text.length - 1 ) );

@@ -138,3 +138,3 @@

/**
* Enables auto-link on <kbd>enter</kbd> key.
* Enables autolinking on the <kbd>Enter</kbd> key.
*

@@ -165,3 +165,3 @@ * @private

/**
* Enables auto-link on <kbd>shift</kbd>+<kbd>enter</kbd> key.
* Enables autolinking on the <kbd>Shift</kbd>+<kbd>Enter</kbd> keyboard shortcut.
*

@@ -193,3 +193,3 @@ * @private

/**
* Checks passed range if it contains a linkable text.
* Checks if the passed range contains a linkable text.
*

@@ -216,6 +216,6 @@ * @param {module:engine/model/range~Range} rangeToCheck

/**
* Applies link on a given range.
* Applies a link on a given range.
*
* @param {String} url URL to link.
* @param {module:engine/model/range~Range} range Text range to apply link attribute.
* @param {String} url The URL to link.
* @param {module:engine/model/range~Range} range The text range to apply the link attribute to.
* @private

@@ -222,0 +222,0 @@ */

@@ -78,4 +78,4 @@ /**

editor.conversion.for( 'editingDowncast' )
.attributeToElement( { model: 'linkHref', view: ( href, writer ) => {
return createLinkElement( ensureSafeUrl( href ), writer );
.attributeToElement( { model: 'linkHref', view: ( href, conversionApi ) => {
return createLinkElement( ensureSafeUrl( href ), conversionApi );
} } );

@@ -194,3 +194,3 @@

model: decorator.id,
view: ( manualDecoratorName, writer ) => {
view: ( manualDecoratorName, { writer } ) => {
if ( manualDecoratorName ) {

@@ -197,0 +197,0 @@ const attributes = manualDecorators.get( decorator.id ).attributes;

@@ -397,2 +397,6 @@ /**

if ( !this._getSelectedLinkElement() ) {
// Show visual selection on a text without a link when the contextual balloon is displayed.
// See https://github.com/ckeditor/ckeditor5/issues/4721.
this._showFakeVisualSelection();
this._addActionsView();

@@ -406,5 +410,2 @@

this._addFormView();
// Show visual selection on a text without a link when the contextual balloon is displayed.
// See https://github.com/ckeditor/ckeditor5/issues/4721.
this._showFakeVisualSelection();
}

@@ -591,4 +592,10 @@ // If there's a link under the selection...

const view = this.editor.editing.view;
const model = this.editor.model;
const viewDocument = view.document;
const targetLink = this._getSelectedLinkElement();
const range = model.markers.has( VISUAL_SELECTION_MARKER_NAME ) ?
// There are cases when we highlight selection using a marker (#7705, #4721).
this.editor.editing.mapper.toViewRange( model.markers.get( VISUAL_SELECTION_MARKER_NAME ).getRange() ) :
// If no markers are available refer to a regular selection.
viewDocument.selection.getFirstRange();

@@ -599,3 +606,3 @@ const target = targetLink ?

// Otherwise attach panel to the selection.
view.domConverter.viewRangeToDom( viewDocument.selection.getFirstRange() );
view.domConverter.viewRangeToDom( range );

@@ -602,0 +609,0 @@ return { target };

@@ -34,5 +34,6 @@ /**

* @param {String} href
* @param {module:engine/conversion/downcastdispatcher~DowncastConversionApi} conversionApi
* @returns {module:engine/view/attributeelement~AttributeElement}
*/
export function createLinkElement( href, writer ) {
export function createLinkElement( href, { writer } ) {
// Priority 5 - https://github.com/ckeditor/ckeditor5-link/issues/121.

@@ -39,0 +40,0 @@ const linkElement = writer.createAttributeElement( 'a', { href }, { priority: 5 } );

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