Interactive editor
Explore Section Formatting
Divide a document into independently formatted sections.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
Section Formatting
Divide a document into independently formatted sections.
API used
TXTextControl.selection.sectionFormat
How it works
The current section is reached through Selection.sectionFormat. Because a missing page border is represented by zero-width lines, the sample first assigns a one-point width to the available border sides. It then colors the lines individually and changes only the current section to landscape orientation. All formatting is applied in the browser through callbacks.
Source files
See the implementation
The view, browser behavior, and controller are encapsulated in Demos/RichTextEditor/Editing/Sections.