The didUpdateAttrs method does this:
const optionsUpdated = this.get('optionNames')
.some(optionName => this._isAttrChanged(attrs, optionName));
const htmlUpdated = Ember.get(attrs, 'newAttrs.html.value') !== this.$().trumbowyg('html');
const disabledUpdated = this._isAttrChanged(attrs, 'disabled');
const placeholderUpdated = this._isAttrChanged(attrs, 'placeholder');
if (optionsUpdated || placeholderUpdated) {
this._destroyTrumbowyg();
this._renderTrumbowyg();
}
if (htmlUpdated) {
this.$().trumbowyg('html', this.get('html'));
}
However, if the html property is not empty (i.e an edit form), when enter is pressed, the caret returns to the beginning of the text and stays there (causing the editor to write backwards as a side effect).
I am not sure why this part is needed as the editor seems to be working fine otherwise
The didUpdateAttrs method does this:
However, if the html property is not empty (i.e an edit form), when enter is pressed, the caret returns to the beginning of the text and stays there (causing the editor to write backwards as a side effect).
I am not sure why this part is needed as the editor seems to be working fine otherwise