Links
Introduction
This plugin adds support for external links.
Installation
In commajs-core options add:
import CommaLink from "commajs-link";
options = {
...,
plugins: [
...,
{
pClass: CommaLink,
options: {
onClick: (lnk) => {
return false;
}
}
}
]
}
Usage
To add a link to a document:
commajsInstance.InsertPluginAtSection(CommaLink.GetName(), {
url: "https://www.google.com",
label: "google",
color: "#428ff4"
});
If text is selected by the user on the document while invoking .InsertPluginAtSection, CommaLink will ignore the label option and will convert the selected text into a link.
color is optional, default is equal to (#428ff4)