feat: add getOptions api
This commit is contained in:
@@ -37,6 +37,16 @@ Usage:
|
||||
const base64StringList = await instance.command.getImage(option?: IGetImageOption)
|
||||
```
|
||||
|
||||
## getOptions
|
||||
|
||||
Feature: Get editor options
|
||||
|
||||
Usage:
|
||||
|
||||
```javascript
|
||||
const editorOption = await instance.command.getOptions()
|
||||
```
|
||||
|
||||
## getWordCount
|
||||
|
||||
Feature: Get document word count
|
||||
|
||||
@@ -37,6 +37,16 @@ const {
|
||||
const base64StringList = await instance.command.getImage(option?: IGetImageOption)
|
||||
```
|
||||
|
||||
## getOptions
|
||||
|
||||
功能:获取编辑器配置
|
||||
|
||||
用法:
|
||||
|
||||
```javascript
|
||||
const editorOption = await instance.command.getOptions()
|
||||
```
|
||||
|
||||
## getWordCount
|
||||
|
||||
功能:获取文档字数
|
||||
|
||||
@@ -82,6 +82,7 @@ export class Command {
|
||||
public executeLocationGroup: CommandAdapt['locationGroup']
|
||||
public getCatalog: CommandAdapt['getCatalog']
|
||||
public getImage: CommandAdapt['getImage']
|
||||
public getOptions: CommandAdapt['getOptions']
|
||||
public getValue: CommandAdapt['getValue']
|
||||
public getHTML: CommandAdapt['getHTML']
|
||||
public getText: CommandAdapt['getText']
|
||||
@@ -184,6 +185,7 @@ export class Command {
|
||||
this.executeLocationGroup = adapt.locationGroup.bind(adapt)
|
||||
// 获取
|
||||
this.getImage = adapt.getImage.bind(adapt)
|
||||
this.getOptions = adapt.getOptions.bind(adapt)
|
||||
this.getValue = adapt.getValue.bind(adapt)
|
||||
this.getHTML = adapt.getHTML.bind(adapt)
|
||||
this.getText = adapt.getText.bind(adapt)
|
||||
|
||||
@@ -1706,6 +1706,10 @@ export class CommandAdapt {
|
||||
return this.draw.getDataURL(payload)
|
||||
}
|
||||
|
||||
public getOptions(): DeepRequired<IEditorOption> {
|
||||
return this.options
|
||||
}
|
||||
|
||||
public getValue(options?: IGetValueOption): IEditorResult {
|
||||
return this.draw.getValue(options)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user