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

@ckeditor/ckeditor5-link

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-link

Link feature for CKEditor 5.


Version published
Weekly downloads
493K
increased by35.47%
Maintainers
0
Weekly downloads
 
Created

What is @ckeditor/ckeditor5-link?

@ckeditor/ckeditor5-link is a plugin for CKEditor 5 that allows users to create, edit, and manage links within the editor. It provides a user-friendly interface for adding hyperlinks to text, ensuring that the links are properly formatted and functional.

What are @ckeditor/ckeditor5-link's main functionalities?

Adding a Link

This feature allows users to add hyperlinks to selected text within the editor. The toolbar includes a link button that opens a dialog for entering the URL.

ClassicEditor.create(document.querySelector('#editor'), { plugins: [ Link ], toolbar: [ 'link' ] })

Editing a Link

This feature allows users to edit existing links. Users can change the URL or the display text of the link through the editor's interface.

editor.model.change(writer => { const linkElement = writer.createElement('link', { href: 'https://example.com' }); writer.insert(linkElement, editor.model.document.selection.getFirstPosition()); });

Removing a Link

This feature allows users to remove hyperlinks from the text. The link is removed, but the text remains intact.

editor.model.change(writer => { const selection = editor.model.document.selection; const range = selection.getFirstRange(); writer.removeAttribute('linkHref', range); });

Other packages similar to @ckeditor/ckeditor5-link

FAQs

Package last updated on 09 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts