Skip to content

Commit

Permalink
Added placeholder to on_change for quill.ts (#3427)
Browse files Browse the repository at this point in the history
* Added placeholder to on change

* Update panel/models/quill.ts

Co-authored-by: Philipp Rudiger <[email protected]>

Co-authored-by: Philipp Rudiger <[email protected]>
  • Loading branch information
hoxbro and philippjfr authored Apr 19, 2022
1 parent dc4aab9 commit b616a7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion panel/models/quill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit b616a7e

Please sign in to comment.