Package Exports
- cm6-texttolink
- cm6-texttolink/texttolink.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cm6-texttolink) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CodeMirror 6 - TextToLink Extension
This is an extension for CodeMirror 6 to add a clickable link icon next to a valid URL.
Demo
How To Use
First you need to add the extension :
npm i cm6-texttolink
And then import the function :
import { TextToLink, hyperLinkStyle } from 'cm6-texttolink'
And then you can add the functions to extension array :
let extension = [ basicSetup, TextToLink(EditorView), hyperLinkStyle ];
Credit
SVG Icon and CSS style are from @uiwjs/react-codemirror/hyper-link
License
MIT