What's New in TX Text Control .NET Server 21.0
With version 21.0, TX Text Control got its first word processor that runs in the browser: the HTML5 Web Editor. The same version made the rendering of a ServerTextControl available on the server through the new ServerVisualization namespace, and it added field adapters for the content controls of MS Word documents.
Version 21.0 was released in September 2014 as TX Text Control X11, together with TX Spell .NET 5.0 and TX Barcode .NET 4.0, as the blog article TX Text Control X11 Released: Cross-browser Template Editing announced. It was the first version sold as TX Text Control .NET Server, with an installer of its own. Its Web Editor is an ASP.NET Web Forms control for the .NET Framework and is legacy technology today; new applications use the Document Editor. Features of the Windows Forms and WPF controls, such as the localizable Find, Replace and Color dialog boxes, aren't listed here.
Version 21.0 at a Glance
| Area | What is new |
|---|---|
| HTML5 Web Editor | Web.TextControl, an ASP.NET server control with a WYSIWYG word processor, and the TX Text Control Web Server Windows service |
| Server visualization | Images of the text, the ruler bars, the status bar and the dialog boxes of a ServerTextControl, and simulated keyboard and mouse input |
| Content controls | Field adapters for the content controls of MS Word |
| Proofing | Automatic language detection with TX Spell .NET 5.0 |
| Text and tables | Searching for whole words, selecting a table range between two cells |
| Version information | ServerTextControl.GetVersionInfo |
HTML5 Web Editor
Web.TextControl is an ASP.NET server control that puts a WYSIWYG word processor into an ASP.NET Web Forms application. It works together with the TX Text Control Web Server, a Windows service on the web server. The service keeps a copy of the document in sync with the browser, so that the text is rendered on every client exactly as on the server. All classes of the editor are in the TXTextControl.Web namespace.
The control of version 21.0 offers these members:
- Loading and saving. LoadText and LoadTextAsync replace the content of the editor with a document, and SaveText saves it. The asynchronous method returns without waiting until the document is loaded.
- Data for templates. LoadDataSet, LoadXMLDatabase and their asynchronous versions load the database whose table and field names the mailings ribbon tab offers as menu items.
- File directories. GetFileDirectory and SetFileDirectory, with their asynchronous versions, get and set the directory where the files of a file type are stored.
- Layout and state. Dock docks the control in its container or page, and IsReady tells whether all TX Text Control components are loaded in the worker process of the service.
Version 22.0 added clipboard support, drag and drop and a server-side API for selections and text parts.
Server Visualization
The ServerVisualization namespace generates images of what a ServerTextControl would show on screen, and takes simulated user input:
- Text. ServerVisualization.TextViewGenerator is a kind of
ServerTextControlthat renders its text as an image. Its View object provides the image and defines the part of the document it shows. When the view changes, the image is updated and the View.Changed event occurs. - User input. ServerVisualization.UserInput simulates the keyboard and the mouse with methods such as SendKeyDown, SendMouseDown and SendMouseWheel.
- Ruler bars and status bar. ServerVisualization.RulerBarViewGenerator and ServerVisualization.StatusBarViewGenerator work the same way for a horizontal or vertical ruler bar and for a status bar.
- Dialog boxes. ServerVisualization.DialogViewGenerator renders the built-in dialog boxes. TextViewGenerator.GetDialogBox returns one.
- Events.
TextViewGeneratorraises events for the caret, the document size, drawn shapes, context menus and the selection of images, text frames, charts and barcodes, such as CaretStateChanged, DocumentSizeChanged and TextContextMenuOpening.
Server Visualization describes the namespace as it is today.
Content Control Adapters
Content controls are the controls that MS Word adds to documents and templates to automate them. The DocumentServer.Fields namespace received an adapter class for each kind, so that you read and change them without editing the parameters of the underlying ApplicationField:
- Text. RichTextContentControl and PlainTextContentControl.
- Choices. CheckBoxContentControl, ComboBoxContentControl and DropDownListContentControl. The feature list of the version calls the last one "DropDownContentControl"; the class is named
DropDownListContentControl. - Dates. DateContentControl, with the calendar, the date format and the language of the date.
- Common properties. The base class ContentControlFieldAdapter provides Id, Tag, Title, Placeholder, ContentEditable, ContentDeletable and Type.
Content Controls shows how to work with them today.
Document Processing
- Automatic language detection. With TX Spell .NET 5.0 connected, ServerTextControl.IsLanguageDetectionEnabled set to
truedetects the language of all text that has the neutral language. See Spell Checking and Hyphenation. - Whole words. The FindOptions value
MatchWholeWordfinds only occurrences of the search text that are whole words. - Table ranges. A new overload of Table.Select selects the part of a table between two cells.
- Version information. ServerTextControl.GetVersionInfo returns a VersionInfo object with the Major and Minor version, the ServicePack number (0 for the original release) and the product level. The reference documents the product level as the property ProductLevel, but in the assemblies the property is named
Level, andProductLevelis the type of its value.
Upgrade to Version 21.0
Version 21.0 has no update notes.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 21.0 lists for TX Text Control .NET Server. Names are relative to the TXTextControl namespace, each name links to its current reference page, and "(obsolete)" marks a member that is obsolete today. The version's own list names the ListItems property of DropDownListContentControl as a property of DateContentControl; it is listed here with the class it belongs to.
New Classes
- DocumentServer.Fields.CheckBoxContentControl
- DocumentServer.Fields.ComboBoxContentControl
- DocumentServer.Fields.ContentControlFieldAdapter
- DocumentServer.Fields.DateContentControl
- DocumentServer.Fields.DropDownListContentControl
- DocumentServer.Fields.PlainTextContentControl
- DocumentServer.Fields.RichTextContentControl
- ServerVisualization.CaretStateEventArgs
- ServerVisualization.DialogViewGenerator
- ServerVisualization.DocumentSizeChangedEventArgs
- ServerVisualization.DrawShapeEventArgs
- ServerVisualization.MenuItem
- ServerVisualization.RulerBarViewGenerator
- ServerVisualization.RulerBarViewGenerator.Colors
- ServerVisualization.ShowDialogBoxEventArgs
- ServerVisualization.ShowErrorMessageEventArgs
- ServerVisualization.StatusBarViewGenerator
- ServerVisualization.StatusBarViewGenerator.Colors
- ServerVisualization.TextContextMenuEventArgs
- ServerVisualization.TextViewGenerator
- ServerVisualization.TextViewGenerator.Colors
- ServerVisualization.UserInput
- ServerVisualization.View
- VersionInfo
- Web.TextControl
Members by Class
Next Steps
- Version 22.0: the features of the next version.
- Version 20.0: right-to-left text, hyphenation and object merging.
- Content Controls: content controls in the current version.