vue-wysiwyg
vue-wysiwyg copied to clipboard
In IE 11 the v-model is not updating
In IE 11, when entering text into the wysiwyg box, the corresponding v-model is not being updated.
I'm having the same issue
I'm also having this issue, can this be fixed?
Issue: This package uses <div contenteditable="true"></div>
as the input field. IE doesn't respond to input
events added to this div.
Solution: Change event name to textinput
, it works in IE 11 for event attachment. Just be sure you let the other browsers use input
.
In case anyone comes here looking up this issue, here's a temporary fix that I employed (I know, it's dirty, but you know, IE and deadlines):
if ( self.isIE11() ) {
jQuery( '.editr .editr--content' ).on( 'textinput', function ( event ) {
let updatedContent = jQuery( event.target ).html();
self.myData = updatedContent;
} );
}
Yes, jQuery, which I'm using anyway, and that's the isIE11 mixin which is in use to capture routing event issues with Vue and IE. it's not the prettiest, but the rest of my code works without modification.