Try to fix HtmlEditor isHtml() issue with SquireUI

Real fix should be made with the wrong use of modeToggle()
This commit is contained in:
djmaze 2020-09-17 16:10:27 +02:00
parent 9c18126843
commit 5d281486d0
3 changed files with 2 additions and 5 deletions

View file

@ -125,7 +125,7 @@ class HtmlEditor {
* @returns {boolean}
*/
isHtml() {
return this.editor ? 'wysiwyg' === this.editor.mode : false;
return this.editor ? 'plain' !== this.editor.mode : false;
}
/**

View file

@ -428,9 +428,6 @@ squire-raw.js:2583: this.fireEvent( event.type, event );
squire-raw.js:2864: this.fireEvent( 'pathChange', { path: newPath } );
squire-raw.js:2867: this.fireEvent( range.collapsed ? 'cursor' : 'select', {
squire-raw.js:3004: this.fireEvent( 'input' );
squire-raw.js:3080: this.fireEvent( 'input' );
squire-raw.js:3101: this.fireEvent( 'input' );
squire-raw.js:4036: this.fireEvent( 'willPaste', event );
squire-raw.js:4089: this.fireEvent( 'willPaste', event );
*/

View file

@ -762,7 +762,7 @@ class ComposePopupView extends AbstractViewNext {
onWarmUp() {
if (this.modalVisibility && !this.modalVisibility()) {
this.editor((editor) => editor.modeToggle(false));
this.editor(editor => editor.modeToggle(false));
}
}