commajs
Links
Introduction
This plugin adds support for external links.
Installation
npm install commajs-link
In commajs-core options add:
import CommaLink from "commajs-link";
                
options = {
    ...,                
    plugins: [
        ...,
        { 
            pClass: CommaLink, 
            options: { 
                onClick: (lnk) => {
                    //return true to stop default behaviour 
                    //by default the plugin calls: window.open(lnk, '_blank');                                
                    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)
 
© 2020 Plugg, Inc. All rights reserved. Various trademarks held by their respective owners.
Plugg, Inc. - San Francisco, CA 94114, United States