mirror of
https://github.com/flarum/framework.git
synced 2025-03-10 12:21:11 +08:00
Use custom event on ALL SuperTextEditor actions
This commit is contained in:
parent
bd1babcc05
commit
9b3c94964c
@ -22,6 +22,8 @@ export default class SuperTextarea {
|
|||||||
*/
|
*/
|
||||||
setValue(value) {
|
setValue(value) {
|
||||||
this.$.val(value).trigger('input');
|
this.$.val(value).trigger('input');
|
||||||
|
|
||||||
|
this.el.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,8 +51,6 @@ export default class SuperTextarea {
|
|||||||
*/
|
*/
|
||||||
insertAtCursor(text) {
|
insertAtCursor(text) {
|
||||||
this.insertAt(this.el.selectionStart, text);
|
this.insertAt(this.el.selectionStart, text);
|
||||||
|
|
||||||
this.el.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user