feat: add form mode #221

This commit is contained in:
Hufe921
2023-08-02 20:35:45 +08:00
parent ae5b929003
commit 94247c324b
10 changed files with 46 additions and 11 deletions
+4 -2
View File
@@ -11,7 +11,7 @@ instance.command.commandName()
## executeMode
功能:切换编辑器模式(编辑、清洁、只读)
功能:切换编辑器模式(编辑、清洁、只读、表单
用法:
@@ -745,9 +745,11 @@ instance.command.executeWordTool()
```
## executeSetHTML
功能:设置编辑器HTML数据
功能:设置编辑器 HTML 数据
用法:
```javascript
instance.command.executeSetHTML(payload: Partial<IEditorHTML)
```
+1 -1
View File
@@ -14,7 +14,7 @@ new Editor(container, IEditorData | IElement[], {
```typescript
interface IEditorOption {
mode?: EditorMode // 编辑器模式:编辑、清洁(不显示视觉辅助元素。如:分页符)、只读。默认:编辑
mode?: EditorMode // 编辑器模式:编辑、清洁(不显示视觉辅助元素。如:分页符)、只读、表单(仅控件内可编辑)。默认:编辑
defaultType?: string // 默认元素类型。默认:TEXT
defaultFont?: string // 默认字体。默认:Yahei
defaultSize?: number // 默认字号。默认:16