我正在使用带有羽毛笔编辑器的 Angular 7。用例:我有羽毛笔编辑器,需要在双击任何按钮时附加一些文本,获取双击的值但无法获得羽毛笔编辑器内的光标位置。
我尝试使用 (onContentChanged)、(onEditorCreated) 和 (onSelectionChanged) 并尝试使用 onFocus,因为我必须在单个模板中使用多个羽毛笔编辑器。
只需要在焦点编辑器上附加文本,但只需要在光标位置上。
这是我的代码示例
<quill-editor #editor [maxLength]="maxLength"
[minLength]="minLength"
[modules]="quillConfig"
[(ngModel)]="text"
(onContentChanged)="contentchanged($event)"
(onEditorCreated)="editorCreated($event)"
[placeholder]="placeholder"
[readOnly]="readonly"
[required]="required"
[style]="{height: height}"
(onSelectionChanged)="onFocus($event)">