JSPM

cm6-texttolink

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28811F
  • License MIT

CodeMirror 6 Extension to add a clickable link icon next to a valid URL

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

Demo On GitHub Page

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