CKEDITOR.Link Class
src/core/link.js:6
Link class utility. Provides methods for create, delete and update links.
Constructor
CKEDITOR.Link
-
editor
Parameters:
-
editor
ObjectThe CKEditor instance.
Index
Methods
_getCompleteURI
-
URI
Checks if the URI has a scheme. If not, the default 'http' scheme with hierarchical path '//' is added to it.
Parameters:
-
URI
StringThe URI of the link.
Returns:
The URI updated with the protocol.
create
-
URI
-
attrs
Create a link with given URI as href.
Parameters:
-
URI
StringThe URI of the link.
-
attrs
ObjectA config object with link attributes. These might be arbitrary DOM attributes.
getFromSelection
()
CKEDITOR.dom.element
Retrieves a link from the current selection.
Returns:
The retrieved link or null if not found.
remove
-
link
Removes a link from the editor.
Parameters:
-
link
CKEDITOR.dom.elementThe link element which link style should be removed.
update
-
URI
-
link
Updates the href of an already existing link.
Parameters:
-
URI
StringThe new URI of the link.
-
link
CKEDITOR.dom.elementThe link element which href should be removed.