From b616a7e2c305027291ba0bd83c735d245974cc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Tue, 19 Apr 2022 15:15:12 +0200 Subject: [PATCH] Added placeholder to on_change for quill.ts (#3427) * Added placeholder to on change * Update panel/models/quill.ts Co-authored-by: Philipp Rudiger Co-authored-by: Philipp Rudiger --- panel/models/quill.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panel/models/quill.ts b/panel/models/quill.ts index 40912a30c0..ec8dbead53 100644 --- a/panel/models/quill.ts +++ b/panel/models/quill.ts @@ -31,7 +31,10 @@ export class QuillInputView extends PanelHTMLBoxView { this.quill.enable(!this.model.disabled) this._editing = false }) - const {mode, toolbar} = this.model.properties + const {mode, toolbar, placeholder} = this.model.properties + this.on_change([placeholder], () => { + this.quill.root.setAttribute('data-placeholder', this.model.placeholder) + }) this.on_change([mode, toolbar], () => { this.render() this._layout_toolbar()