docs: function(node, avoidInvisibleSpace) {
        var range           = rangy.createRange(this.doc),
            isElement       = node.nodeType === wysihtml5.ELEMENT_NODE,
            canHaveHTML     = "canHaveHTML" in node ? node.canHaveHTML : (node.nodeName !== "IMG"),
            content         = isElement ? node.innerHTML : node.data,
            isEmpty         = (content === "" || content === wysihtml5.INVISIBLE_SPACE),
            displayStyle    = dom.getStyle("display").from(node),
            isBlockElement  = (displayStyle === "block" || displayStyle === "list-item");
  
        if (isEmpty && isElement && canHaveHTML && !avoidInvisibleSpace) {
          // Make sure that caret is visible in node by inserting a zero width no breaking space
          try { node.innerHTML = wysihtml5.INVISIBLE_SPACE; } catch(e) {}
        }
  
        if (canHaveHTML) {
          range.selectNodeContents(node);
        } else {
          range.selectNode(node);
        }
  
        if (canHaveHTML && isEmpty && isElement) {
          range.collapse(isBlockElement);
        } else if (canHaveHTML && isEmpty) {
          range.setStartAfter(node);
          range.setEndAfter(node);
        }
  
        this.setSelection(range);
      }