TX Text Control .NET Server

Document Editor

Topic

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 TXTextControl object, 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 toRead
Understand the frontend, the WebSocket middleware and the backend process, and configure the backendArchitecture
Open documents in the editor and store them on your serverLoading and Saving Documents
Read and set the title, author and user-defined properties or embed files in PDF documentsDocument Properties
Select, insert, find and replace text or undo changesEditing Text
Format text, paragraphs and lists, or use stylesText and Paragraph Formatting
Insert and format tables, or calculate cells with formulasTables
Insert images, text frames or drawingsImages, Shapes
Insert charts or barcodesCharts and Barcodes
Add page numbers, headers and footers or different page layoutsHeaders and Footers, Sections
Add footnotes or a table of contentsFootnotes, Tables of Contents
Insert fields, hyperlinks and bookmarksFields
Mark parts of a document to find and process them laterSubtext Parts
Build forms that users fill outForm Fields, Content Controls
Prepare documents for signingSignature Fields
Review documents with tracked changes and commentsTrack Changes, Comments
Restrict what users can change, or keep parts editable for single usersDocument Protection
Highlight spelling errors or hyphenate wordsSpell Checking
Control the view mode, zoom, rulers and status bar or print documentsViewing and Printing
Change the ribbon, the context menus or the language of the user interfaceRibbon and UI
Learn how the TXTextControl object, callbacks and collections workJavaScript API
React to what users do, or find out when the editor is readyEvents

Where to Start

  1. Architecture: what happens between the browser and the server.
  2. JavaScript API: how your code talks to the editor.
  3. Loading and Saving Documents: get real documents into the editor and back.
  4. The page of the feature you need, from the table above.