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