|
|
@ -106,17 +106,18 @@ export class SignTextEditor extends Widget { |
|
|
|
_checkText() { |
|
|
|
_checkText() { |
|
|
|
const o = this.options; |
|
|
|
const o = this.options; |
|
|
|
nextTick( |
|
|
|
nextTick( |
|
|
|
bind(() => { |
|
|
|
() => { |
|
|
|
if (this.editor.getValue() === "") { |
|
|
|
if (this.editor.getValue() === "") { |
|
|
|
this.text.setValue(o.watermark || ""); |
|
|
|
this.text.setValue(o.watermark || ""); |
|
|
|
this.text.element.addClass("bi-water-mark"); |
|
|
|
this.text.element.addClass("bi-water-mark"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
let v = this.editor.getValue(); |
|
|
|
let v = this.editor.getValue(); |
|
|
|
v = isEmpty(v) || v === o.text ? o.text : v + o.text; |
|
|
|
v = isEmpty(v) || v === o.text ? o.text : v + o.text; |
|
|
|
|
|
|
|
console.log(v) |
|
|
|
this.text.setValue(v); |
|
|
|
this.text.setValue(v); |
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
this.text.element.removeClass("bi-water-mark"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, this) |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|