引入类似`Office Word`的限制编辑功能,产品功能参考`WPS Word`: - 只读 - 可以防止文档被修改,和[Editor.setEditable](https://tiptap.dev/api/editor#set-editable)不一样的是,可以设置允许编辑的区域; - 在文档中选择部分区域,并选择可以对其进行编辑的用户 - 修订 - 允许修改文档,但修改记录将以修订方式展现 - 批注 - 只允许在文档中插入批注。不过,可以设置允许编辑的区域 - 在文档中选择部分内容,并选择可以对其进行编辑的用户 - 填写表单域(窗体) - 可防止文档被修改,只能在表单域中填写内容 References: 1. [WPS Open API](https://open.wps.cn/docs/client/wpsLoad) 1. ContentControl 2. FormField 2. [WPS移动端JS API启动参数](https://open.wps.cn/docs/client/js-api/appendix/param-list) 3. [如何:使用内容控件保护文档部分](https://learn.microsoft.com/zh-cn/visualstudio/vsto/how-to-protect-parts-of-documents-by-using-content-controls?view=vs-2022&tabs=csharp) 4. [如何:以编程方式保护文档和文档部分](https://learn.microsoft.com/zh-cn/visualstudio/vsto/how-to-programmatically-protect-documents-and-parts-of-documents?view=vs-2022&tabs=csharp) 5. [Word.ContentControl class](https://learn.microsoft.com/zh-cn/javascript/api/word/word.contentcontrol?view=word-js-preview) 6. [How to prevent a node from being deleted](https://github.com/ueberdosis/tiptap/issues/181#issuecomment-1213455982) 7. [PluginSpec.filterTransaction](https://prosemirror.net/docs/ref/#state.PluginSpec.filterTransaction)