You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for building this web component. It makes the life of me and my colleagues a lot easier 😄.
After implementing it I encountered some cases where the value setter didn't propagate the new value correctly to the TinyMCE editor. The value only seems to be propagated when the internal _status is "Ready".
It would be great if we could set this value regardless of what the status is, so that we are able to set the value prior to 'Ready', or even during initializing.
This is the way we go around it currently:
const tinyMCEWebComponent = this.querySelector('tinymce-editor');
if (tinyMCEWebComponent._editor) {
const target = tinyMCEWebComponent._editor.getElement();
if (target) {
target.value = value;
}
}
// Only set the textContent when the status is 'Raw', which is the state
// prior to Initializing. When initializing, it is often too late to
// set the value to the textContent since it is read immediately after it switched state to Initializing.
if (tinyMCEWebComponent._status === 0) { // 0 equals 'Raw'. Other states are 'Initializing' and 'Ready'.
tinyMCEWebComponent.textContent = value;
}
// Always try to set the value through the setter of the tinymce web
// component. It has some checks internally, so it is only setting the
// value when the state is 'Ready'.
tinyMCEWebComponent.value = value;
Which I'd like to avoid 🙂
The text was updated successfully, but these errors were encountered:
First of all, thanks for building this web component. It makes the life of me and my colleagues a lot easier 😄.
After implementing it I encountered some cases where the value setter didn't propagate the new value correctly to the TinyMCE editor. The value only seems to be propagated when the internal
_status
is "Ready".It would be great if we could set this value regardless of what the status is, so that we are able to set the value prior to 'Ready', or even during initializing.
This is the way we go around it currently:
Which I'd like to avoid 🙂
The text was updated successfully, but these errors were encountered: