Interactive editor
Explore Headers and Footers
Create headers and footers that repeat across document pages.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Headers and Footers
Create headers and footers that repeat across document pages.
Component used
TXTextControl.Web.MVC.TextControl
How it works
Headers and footers are edited through the built-in Insert ribbon controls. The sample document demonstrates repeating page content while retaining independent header and footer text parts.
Key code
This is the Razor helper chain that adds TX Text Control to the page.
<div class="tx-editor-host">
@Html.TXTextControl()
.TextControl(settings => {
settings.Dock = DockStyle.Fill;
})
.LoadText(documentPath, StreamType.InternalUnicodeFormat)
.Render()
</div>
Source files
See the implementation
The view, browser behavior, and controller are encapsulated in Demos/RichTextEditor/Editing/HeadersFooters.