@leanprover/unicode-input-component
v0.1.8
Published
Typescript support for contenteditable divs with the Unicode input support of the Lean 4 theorem prover
Readme
Usage
- Add a new
contenteditablediv to your HTML that serves as the input:<div id="unicode-input" contenteditable="true"></div> - Import
InputAbbreviationRewriterfrom this package and create a newInputAbbreviationRewriterfor#unicode-input - Make sure to call
InputAbbreviationRewriter.resetAbbreviationswhenever setting the text of#unicode-inputprogrammatically, as theInputAbbreviationRewriteronly triggers on actual user input - Add
white-space: -moz-pre-spaceto#unicode-input, otherwise there's an error with multiple spaces on Firefox. - Style
#unicode-inputto your liking
This component only supports single-line input and no rich text styling other than the abbreviation highlighting.
