title: Tinymce - Is it possible to get caret position of textarea corresponding to WYSIWYG Editor?
body: <p>I'm wondering if we can get the real caret position of textarea when the fake cursor is in certain position under WYSIWYG Editor?</p>
  
  <p>To better understand the question, please see the image below</p>
  
  <p><img src="https://i.stack.imgur.com/knpW4.gif" alt="enter image description here">
  Under WYSIWYG mode, when the cursor is after <strong>s</strong>, we get position <strong>53</strong>. and when the cursor is after <strong>t</strong>, we get position <strong>79</strong>.</p>
  
  <p>The code would be something like...</p>
  
  <pre class="lang-js prettyprint-override"><code>function getRealCaretPosition() {
      // all the dirty work goes here
  }
  
  // Ctrl + Q
  if(e.ctrlKey &amp;&amp; e.which == 81) {
      var pos = getRealCaretPosition();
      alert(pos);
  }
  </code></pre>
  
  <p>Is this possible to be achieved, in theory?</p>