使用Froala编辑器时遇到问题。单击带有占位符文本的编辑器时,我无法获得焦点。我必须在占位符文本后点击才能获得焦点。我还注意到,当我点击占位符文本时,froalaEditor.click
,froalaEditor.commands.after
,froalaEditor.focus
等事件不会触发。如果我点击文本后,一切似乎都没问题。我的占位符文本很长,所以有点烦人的用户总是转到占位符的末尾并点击以获得焦点。
我正在使用Angular。任何人都可以帮忙吗?
<div id="problemStatment" name="problemStatment"
[froalaEditor]="Options"
[(froalaModel)]="modelname" [(ngModel)]="modelname"
style="width:100%;max-height:370px;height:500px;">
</div>
this.Options = {
key: 123456789,
height: 320,
maxHeight: 320,
quickInsert: false,
placeholderText: "explain xxxx<br/>explain yyyyy<br/>explain zzz",
toolbarSticky: true,
charCounterCount: false,
toolbarInline: false,
toolbarButtons: ['paragraphFormat', 'fontFamily', 'fontSize', 'cut', 'copy', 'paste',
'bold', 'italic', 'underline', 'color', 'align', 'formatOL',
'formatUL', 'outdent', 'indent', 'insertImage', 'spellChecker'],
toolbarVisibleWithoutSelection: false,
backgroundColor: '#f0f',
required: true,
imageUploadURL: '/path/path/api/',
imageUploadMethod: 'POST',
imageMaxSize: 1024 * 1024 * 1,
events: {
'froalaEditor.commands.after': this.OnChange.bind(this),
'froalaEditor.image.beforeUpload': this.beforeImageUploadEvent.bind(this),
'froalaEditor.click': this.OnChange.bind(this),
'froalaEditor.focus': this.OnChange.bind(this),
}