Possible strategies in creating a web based editor

Een artikel, meer dan één jaar geleden geplaatst onder textarea, web, editor, wysiwyg, trix, online, contenteditable & canvas.

This may not be the complete list of possible strategies, but this is my own documentation of a short exploration.

textarea

One of the simplest form of “editors” is the plain textarea. Sometimes enriched by Javascript, adding snippets of text to assist more complicated markup styles (e.g. select text, and make it bold by surrounding it with a double asterisk (in case of markdown)).

Advantages:

  • robust
  • simple

Disadvantages:

  • No advanced markup (and/or relies on e.g. markdown, which is nice, but not for everyone)

By offering a preview of the markup, the disadvantage can be mitigated to some extend.

More information: MDN on <textarea>

It is possible to position autocomplete helpers when the entry font is of a fixed type; as you can find the position of the caret within the text (using [selectionStart (on MDN)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAr…

Lees verder...

Op de hoogte blijven?

Maandelijks maak ik een selectie artikelen en zorg ik voor wat extra context bij de meer technische stukken. Schrijf je hieronder in:

Mailfrequentie = 1x per maand. Je privacy wordt serieus genomen: de mailinglijst bestaat alleen op onze servers.