Document Editor
Once the Document Editor runs in your application, the work shifts to building features on top of it. You learn how the editor works at runtime, how your code loads and saves documents and how it changes the content of a document through the JavaScript API.
If you haven't added the editor yet, start with Getting Started: Document Editor. The Document Editor page in the Overview explains what the editor is and which frontends are available.
How You Work With the Editor
Users edit documents with the ribbon of the editor. Your code works with the same document in two ways:
- On the server, your ASP.NET Core application passes documents to the editor and stores what the editor saves.
- In the browser, the JavaScript API, the global
TXTextControlobject, reads and changes the document: its text and formatting, properties, tables, images, fields, sections, tracked changes, comments and protection. Its events tell your code what the user does.
The JavaScript API is the same in every frontend: the ASP.NET Core view, a plain JavaScript page, Angular, React and Blazor. The examples of this section use the ASP.NET Core application of the Getting Started tutorial, and their JavaScript works in the other frontends as well.
Most methods of the API are asynchronous and pass their results to callback functions. Read JavaScript API before the pages about single features, because they all rely on this model.
Find the Right Page
| If you want to | Read |
|---|---|
| Understand the frontend, the WebSocket middleware and the backend process, and configure the backend | Architecture |
| Open documents in the editor and store them on your server | Loading and Saving Documents |
| Read and set the title, author and user-defined properties or embed files in PDF documents | Document Properties |
| Select, insert, find and replace text or undo changes | Editing Text |
| Format text, paragraphs and lists, or use styles | Text and Paragraph Formatting |
| Insert and format tables, or calculate cells with formulas | Tables |
| Insert images, text frames or drawings | Images, Shapes |
| Insert charts or barcodes | Charts and Barcodes |
| Add page numbers, headers and footers or different page layouts | Headers and Footers, Sections |
| Add footnotes or a table of contents | Footnotes, Tables of Contents |
| Insert fields, hyperlinks and bookmarks | Fields |
| Mark parts of a document to find and process them later | Subtext Parts |
| Build forms that users fill out | Form Fields, Content Controls |
| Prepare documents for signing | Signature Fields |
| Review documents with tracked changes and comments | Track Changes, Comments |
| Restrict what users can change, or keep parts editable for single users | Document Protection |
| Highlight spelling errors or hyphenate words | Spell Checking |
| Control the view mode, zoom, rulers and status bar or print documents | Viewing and Printing |
| Change the ribbon, the context menus or the language of the user interface | Ribbon and UI |
Learn how the TXTextControl object, callbacks and collections work | JavaScript API |
| React to what users do, or find out when the editor is ready | Events |
Where to Start
- Architecture: what happens between the browser and the server.
- JavaScript API: how your code talks to the editor.
- Loading and Saving Documents: get real documents into the editor and back.
- The page of the feature you need, from the table above.