bootstrap-wysihtml5
bootstrap-wysihtml5 copied to clipboard
Getting and resetting cursor position after inserting HTML into wysihtml5 text box
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?
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).
Did you find the solution?