RayCraftDocs
v1.0.3 raycraft.dev
On this page

DocumentEditor

Complete

A word processor that opens and saves .docx (and the older .doc), Rich Text Format (.rtf) and OpenDocument (.odt) files. Formatting, headings, lists, tables, pictures, links, page setup, find and replace, printing and export to HTML, Markdown and text. The file code is part of RayCraft.Blazor.Office and has no third-party parts. _No live image: this control is described by text and the API table only._

Parameters

Files are read and written by the library itself, with no Office installation and no extra packages.

ParameterTypeDescription
FormatFilesOpen
Office Open XML.docxYes
OpenDocument.odtYes
Binary document 97-2003.docYes
Rich Text Format.rtfYes
Web page.htmlYes
Markdown.mdYes
Plain text.txtYes

What is kept

ParameterTypeDescription
Feature.docx.odt
Character formattingYesYes
Headings and stylesYesYes
Alignment and spacingYesYes
Bulleted and numbered listsYesYes
Tables with merged cellsYesYes
Table cell borders, vertical alignment, row height, header row, nested tablesYesYes
Pictures (PNG, JPEG, GIF)YesYes
Floating pictures and text boxes (wrap, position, fill, border)YesYes
Page size and marginsYesYes
Headers and footers (first page, odd and even pages, page number, date and title fields)YesYes
Page breaksYesYes
Tracked insertions and deletionsYesFinal text
EquationsYes (unchanged)Text
Columns and sectionsYesPage break

API

ParameterTypeDescription
AllowFileTransferboolShows the commands that open and save files (default true).
ClassstringExtra CSS classes added to the root element.
DocumentTextDocumentThe document shown at start. Read the edited one with GetDocumentAsync.
FileNamestringName given to saved files, without extension (default document).
FontsIReadOnlyList<string>The fonts offered in the font list.
HeightstringHeight of the control as a CSS length (default 40rem).
IgnoredWordsIReadOnlyCollection<string>Words that are never reported as misspelled.
LabelstringAccessible name of the page. Defaults to a localized Document.
MaxImportSizeInt64Largest file that can be opened, in bytes (default 25,000,000).
PdfFontsPdfFontSetFonts for the PDF export, created with PdfFontSet.FromTrueType. Without it the File menu has no PDF command.
ProofAsYouTypeboolUnderlines problems while typing; the user can switch it in the Review menu (default true).
ProofingboolOffers spelling, grammar and logic checking for English and Bulgarian: Review menu, toolbar button and F7 (default true).
ReadOnlyboolShows the document without allowing changes.
ShowMenuBarboolShows the menu bar (default true).
ShowStatusBarboolShows words, characters, page and zoom (default true).
ShowToolbarboolShows the formatting toolbar (default true).
StylestringInline style added to the root element.
ZoomintStarting zoom in percent (default 100).

Events

API

EventTypeDescription
OnChangedEventCallbackRaised after a short pause when the text changed.
OnNewEventCallback
OnSaveEventCallback<OfficeFileSave>
OnSaveAsEventCallback<OfficeFileSave>

Package

DocumentEditor is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.