Exporting Word
This feature allows you to export the content of Umo Editor editor to a Word document.The export Word document feature currently supports most of the node types and page configurations, we will gradually improve this feature.
The exported Word document is in docx
format, you can open and edit it in Microsoft Word or WPS Office, etc.
Method List
exportDocx
Description:Export Word document.
Parameters:{ content, download, filename, docxOption }
content
:[Tiptap JSON document]
,default value is the content of the current editor.download
:Boolean
,Whether to download, default value isfalse
.filename
:String
,Download file name, without file extension, default uses document name.docxOption
:Control the document generation process configuration information, optional, containing the following configuration items:docxOption.getCustomImageBase64
:Async Function
,Custom image reading method, returns a validbase64
string. Optional, containing the following parameters:src: string
Image loading reading pathid: string
Mark the unique identifier of the current imagetype: string
The type of the image to be retrieved,image
image,echarts
chartnode: [Tiptap JSON document]
Tiptap node
docxOption.page.backColor
:String
,Export document background color
Return Value:Blob | undefined
,When download
is false
, returns Blob
, when download
is true
, returns undefined
。