In addition to @Ruan Mendes, to have the context menu display at the proper location you can just get the component current XY focus value , then add it to the coordinates:
var click_x_pos = e.pageX + html_editor.getFocusEl().getX();
var click_y_pos = e.pageY + html_editor.getFocusEl().getY();