What's New in TX Text Control .NET Server 22.0
Version 22.0 built on the HTML5 Web Editor that version 21.0 had introduced. The editor learned to paste formatted content and accept dropped files, and its server control received an API for selections and text parts. For document processing, the version switched image handling to the Windows Imaging Component and added JavaScript actions to PDF documents.
Version 22.0 was released in April 2015 as TX Text Control X12, together with TX Spell .NET 6.0, as the blog article TX Text Control X12 and TX Spell 6.0 Released announced. The HTML5 Web Editor of this version is the ASP.NET Web Forms control Web.TextControl on the .NET Framework, which is legacy technology today; new applications use the Document Editor. The features of the Windows Forms and WPF controls of this version, such as the new WPF button bar, ribbon tabs and dialog boxes, aren't part of TX Text Control .NET Server and aren't listed here.
Version 22.0 at a Glance
| Area | What is new |
|---|---|
| HTML5 Web Editor | Pasting formatted content, dropping files and images, a collapsible ribbon, a spell checking dialog, direct printing, full localization |
| Web Editor programming | Selections and text parts on the server, the TXTextControl JavaScript object in the browser, new properties of Web.TextControl |
| Images | Loading and saving with the Windows Imaging Component, TIF and GIF export |
| Document-level JavaScript actions | |
| Text positions | Input position markers, scrolling to the input position, headers and footers of a page |
HTML5 Web Editor
The Web Editor is the Web.TextControl server control, a WYSIWYG word processor in an ASP.NET Web Forms page. Version 22.0 changed how users work with it:
- Clipboard. Formatted content copied in a client application, for example MS Word, can be pasted into the editor.
- Drag and drop. Users can drop document files and images directly onto the text area.
- Ribbon. The ribbon bar can be collapsed and scrolls horizontally when it doesn't fit.
- Spell checking. A dialog box for spell checking was added.
- Printing. Printing opens the print dialog box of the browser without an extra window.
- Localization. The Web Editor belongs to the resource kit and can be localized completely.
Program the Web Editor
- Selections. Web.TextControl.Selection returns a Web.Selection object. Its Start and Length describe the selected text, Load replaces it with text in a given format, and Save saves it.
- Text parts. Web.TextControl.TextParts returns a Web.TextPartCollection with the main text (Web.MainText), the headers and footers (Web.HeaderFooter, with its Section and Type) and the text frames (Web.TextFrame). Each Web.TextPart implements Web.IFormattedText and has its own
Selection. Activate moves the input focus into a text part and scrolls the document to it. - JavaScript in the browser. The
TXTextControlJavaScript object attaches event handlers to the editor and hides parts of it, such as the ruler bars or the status bar. - Appearance and behavior. New properties of
Web.TextControlcontrol the editor from the server: EditMode (read-only, selectable or editable), ControlChars, TextFieldsEditable, ContextMenusEnabled, TableGridLines, DocumentTargetMarkers, TextFrameMarkerLines, BackColor, StatusBarColor and SaveDocumentQuestionDialogEnabled, which asks for confirmation before unsaved changes are discarded. - WebSocket handler. WebSocketHandlerPath sets the part of the path between the root of the web site and the handler file TXWebSocketHandler.ashx. With
null, the default, or an empty string, the browser derives the handler's url from the url of the page.
Document Processing
- Images. TX Text Control uses the Windows Imaging Component (WIC) to load and save images. Images can now also be exported as TIF and GIF, selected with Image.ExportFilterIndex for one image or SaveSettings.ImageExportFilterIndex for all images of a document.
- JavaScript in PDF documents. SaveSettings.DocumentLevelJavaScriptActions takes an array of scripts that are embedded at document level and run when the PDF document is opened. PDF/A documents don't get them. See PDF Creation.
- Input position. InputPosition.InactiveMarker shows a marker at the input position while the control is inactive and the caret isn't visible, and InputPosition.ScrollTo scrolls the input position into view. TextField.ContainsInputPosition and DocumentTarget.ContainsInputPosition tell whether a field or a target is at the input position.
- Headers and footers of a page. Page.Header and Page.Footer return the header and the footer of a page, or
nullif the page has none. See Pages.
Upgrade to Version 22.0
The update notes of version 22.0 concern TX Text Control .NET for WPF only: the WPF button bar replaced several of its properties with Items, BorderBrush and BorderThickness, the WPF TextControl lost its MousePosition property and can be used only after its own Loaded event. None of these classes is part of TX Text Control .NET Server.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 22.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.
New Classes
- Web.HeaderFooter
- Web.IFormattedText
- Web.MainText
- Web.Selection
- Web.TextFrame
- Web.TextPart
- Web.TextPartCollection
Members by Class
Next Steps
- Version 23.0: the features of the next version.
- Version 21.0: the version that introduced the HTML5 Web Editor and the ServerVisualization namespace.
- Document Editor: the browser-based editor of the current version.