function _getTagNames(tagName) {
    var alias = ALIAS_MAPPING[tagName];
    return alias ? [tagName.toLowerCase(), alias.toLowerCase()] : [tagName.toLowerCase()];
  }
formatInline scenarios for tag "B" (| = caret, |foo| = selected text)

  #1 caret in unformatted text:
     abcdefg|
  output:
     abcdefg<b>|</b>
  
  #2 unformatted text selected:
     abc|deg|h
  output:
     abc<b>|deg|</b>h
  
  #3 unformatted text selected across boundaries:
     ab|c <span>defg|h</span>
  output:
     ab<b>|c </b><span><b>defg</b>|h</span>

  #4 formatted text entirely selected
     <b>|abc|</b>
  output:
     |abc|

  #5 formatted text partially selected
     <b>ab|c|</b>
  output:
     <b>ab</b>|c|

  #6 formatted text selected across boundaries
     <span>ab|c</span> <b>de|fgh</b>
  output:
     <span>ab|c</span> de|<b>fgh</b>