ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## blur <!-- Removes focus from the editor. --> 让编辑器失去焦点。 **方法** ```javascript blur() ``` **示例** ```javascript quill.blur(); ``` ## disable <!-- Shorthand for [`enable(false)`](#enable). --> [`enable(false)`](#enable)的快捷方法。 ## enable <!-- Set ability for user to edit, via input devices like the mouse or keyboard. Does not affect capabilities of API calls, when the `source` is `"api"` or `"silent". --> 让通过鼠标或键盘等输入设备设置让用户能够编辑内容。当`source`为`"api"`或`"silent"时,不影响API的调用。 社 **方法** ```javascript enable(enabled: boolean = true) ``` **示例** ```javascript quill.enable(); quill.enable(false); // Disables user input ``` ## focus <!-- Focuses the editor and restores its last range. --> 焦点编辑器并恢复最后一次的选择。 **方法** ```javascript focus() ``` **示例** ```javascript quill.focus(); ``` ## hasFocus <!-- Checks if editor has focus. Note focus on toolbar, tooltips, does not count as the editor. --> 检查焦点是否在编辑器上,注意,若焦点在工具栏或提示框上,不算作在编辑器上。 **方法** ```javascript hasFocus(): Boolean ``` **示例** ```javascript quill.hasFocus(); ``` ## update <!-- Synchronously check editor for user updates and fires events, if changes have occurred. Useful for collaborative use cases during conflict resolution requiring the latest up to date state. [Source](/docs/api/#events) may be `"user"`, `"api"`, or `"silent"`. --> 如果编辑器内容发生改变,同步检查用户更新和触发事件。在冲突解决方案中要求最新状态的协同案例中有作用。[Source](事件events.md) 可选`"user"`, `"api"`, 或`"silent"` **方法** ```javascript update(source: String = 'user') ``` **示例** ```javascript quill.update(); ```