JSPM

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

Link Plugin for DraftJS

Package Exports

  • @draft-js-plugins/anchor

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 (@draft-js-plugins/anchor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Draft.js Link Plugin

This is a plugin for the draft-js-plugins-editor.

This plugin allows you to add link entities via the inline toolbar. It also provides a decorator that formats the created entities. HTTP, HTTPS, as well as email addresses (with or without mailto: attached to it) are supported.

Usage

import createLinkPlugin from '@draft-js-plugins/anchor';

const linkPlugin = createLinkPlugin();

Importing the default styles

The plugin ships with a default styling available at this location in the installed package: draft-js-anchor-plugin/lib/plugin.css.

If you want to use the default styles, you can include this stylesheet. Otherwise you can supply your own styles via the theme config option.