How can I style text input as I type?

前端 未结 3 1564
予麋鹿
予麋鹿 2021-01-12 14:15

Every time I type a character in an input field, I parse the expression so that I get:

  1. An array of tokens, i.e., tokenArray=[2, *, COS, (, 4, )]
  2. A cor
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 14:39

    Text inputs do not support styled content. End of story.

    A common solution is to use contenteditable instead.

提交回复
热议问题