Skip to content

Commit

Permalink
Fixed primefaces#12131 14.0.2 TextEditor doesn't detect change of con…
Browse files Browse the repository at this point in the history
…tents
  • Loading branch information
melloware committed Jun 17, 2024
1 parent 770b3f8 commit 7a333ce
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ PrimeFaces.widget.TextEditor = PrimeFaces.widget.DeferredWidget.extend({

//set initial value
this.input.val(this.getEditorValue());

//update input on change
this.editor.on('text-change', function(delta, oldDelta, source) {
$this.input.val($this.getEditorValue());
$this.callBehavior('change');
});

this.editor.on('selection-change', function(range, oldRange, source) {
if(range && !oldRange) {
Expand Down

0 comments on commit 7a333ce

Please sign in to comment.