how to get innerHTML from range's start and end in DIV in JavaScript
Clash Royale CLAN TAG#URR8PPP
how to get innerHTML from range's start and end in DIV in JavaScript
How to get innerHTML from parent DIV and the innerHTML stop at selected word?
like example, I will get the result alert innerHTML of This select some <b>is a <i>some
, if I selected the 'asx' word.
This select some <b>is a <i>some
Thank you
function selected(element) element.document;
var win = doc.defaultView
<div id="editor" contenteditable="true">This select some <b>is a <i>some asx</i> sdc</b> select some text in some here.</div>
<button type="button" onclick="selected(document.querySelector('#editor'))">edit</button>
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
stackoverflow.com/q/4652734
– IVO GELOV
Aug 6 at 14:49