Legal document workflow
Explore Legal Line Numbering
Use stable margin references in a protected legal document, then inspect the editable form fields that remain available to the document recipient.
Line-numbered document
The prepared template keeps every reference synchronized with the page layout.
LEGAL LAYOUT
NumberingPart of template layout
Editing modeProtected form
Line numbers are visual references for review and court filings; they are not characters in the document text.
Enter an editable fieldClick a purple field in the legal document to inspect it and open its contextual toolbar.
Active form field
Form field
EDITABLE
Empty field
Identifier-
TypeText form field
Editable fields in this template
Select an item to scroll directly to its position in the protected document.
0 FIELDS
Reading form fields from the document...
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Line references and protected input can coexist
Legal line numbering gives reviewers stable references for contracts, depositions, pleadings, and court filings. The same document can be protected while selected TextFormField objects remain available for data entry.
Form field collection
TXTextControl.formFields
Current field
FormFieldCollection.getItem
Field position
TextField.getStart / getLength
Context events
textFieldEntered / textFieldLeft
How it works
The line numbers are stored with the prepared document layout, so they remain aligned when TX Text Control paginates the legal template. They are visual references rather than text characters and therefore do not change the document's selection indices.
The editor starts with EditMode.ReadOnly | EditMode.UsePassword. This protects the surrounding legal language while allowing the template's editable form fields to accept input. TXTextControl.formFields enumerates those fields without unlocking the document.
When the caret enters a field, textFieldEntered supplies its bounds and FormFieldCollection.getItem returns the live field object. The demo reads getStart, getLength, and getText, then repositions the contextual toolbar whenever the text view scrolls or zooms.
TXTextControl.addEventListener("textFieldEntered", event => {
TXTextControl.formFields.getItem(field => {
field.getStart(start => {
field.getLength(length => showRange(start, length));
});
});
});
@Html.TXTextControl().TextControl(settings => {
settings.Dock = DockStyle.Fill;
settings.EditMode = EditMode.ReadOnly | EditMode.UsePassword;
}).LoadText(templatePath, StreamType.InternalUnicodeFormat).Render()
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0