1. Document.execCommand()

    Allows running commands to manipulate the contents of an editable region in a document switched to designMode

  2. document api: designmode