@leanprover/unicode-input-component
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

Usage

  1. Add a new contenteditable div to your HTML that serves as the input: <div id="unicode-input" contenteditable="true"></div>
  2. Import InputAbbreviationRewriter from this package and create a new InputAbbreviationRewriter for #unicode-input
  3. Make sure to call InputAbbreviationRewriter.resetAbbreviations whenever setting the text of #unicode-input programmatically, as the InputAbbreviationRewriter only triggers on actual user input
  4. Add white-space: -moz-pre-space to #unicode-input, otherwise there's an error with multiple spaces on Firefox.
  5. Style #unicode-input to your liking

This component only supports single-line input and no rich text styling other than the abbreviation highlighting.

Readme

Keywords

none

Package Sidebar

Install

npm i @leanprover/unicode-input-component

Weekly Downloads

12

Version

0.1.4

License

Apache-2.0

Unpacked Size

28.7 kB

Total Files

7

Last publish

Collaborators

  • clovett
  • gebner
  • vtec234
  • mhuisi