bootstrap-wysihtml5 icon indicating copy to clipboard operation
bootstrap-wysihtml5 copied to clipboard

Getting and resetting cursor position after inserting HTML into wysihtml5 text box

Open krawson opened this issue 11 years ago • 2 comments

I am working with bootstrap-wysihtml5 to implement a real-time text editor that allows for multiple connections simultaneously. With the help of Pusher, I am able to trigger events that are seen and update the text box accordingly across multiple browsers and windows, however the text cursor gets reset to the start of the text after we set the html of the editor. Is there a way to capture the current cursor position by caret within the text box that is being edited in and then set the cursor after we call the wysihtml.composer.element.html() function?

krawson avatar Aug 22 '13 01:08 krawson

I second this (using it with KnockOut JS). The issue only happens if there are HTML-tags in the value (thereby affecting the cursor position).

JD-Robbs avatar Sep 29 '13 13:09 JD-Robbs

Did you find the solution?

alisson04 avatar Mar 14 '18 12:03 alisson04