Skip to content

Type Editor


Type Editor / @type-editor/viewdesc / TrailingHackViewDesc

TrailingHackViewDesc

Classes

ClassDescription

TrailingHackViewDesc

A dummy desc used to tag trailing BR or IMG nodes created to work around contentEditable terribleness.

Browsers behave inconsistently with empty block elements or blocks ending without proper line breaks. These hack nodes ensure proper cursor placement and visual representation:

  • BR: Makes empty blocks or block ends properly display and accept cursor
  • IMG: Used as a separator in some cases to work around browser bugs