Skip to main content

Header and Footer

Create a header and populate it with a text

var section = richEdit.document.sections.getByIndex(0);
var subDocument = section.getHeader(DevExpress.RichEdit.HeaderFooterType.Primary, true);
subDocument.insertText(0, 'text');
richEdit.beginUpdate();
richEdit.history.beginTransaction(); 
richEdit.executeCommand(DevExpress.RichEdit.InsertTabCommandId.InsertFooter);  
var section = richEdit.document.sections.getByIndex(0);
var subDocumentFooter = section.getFooter(DevExpress.RichEdit.HeaderFooterType.Primary, true)
var table = subDocumentFooter.tables.create(0, 2, 3);
richEdit.history.endTransaction();
richEdit.endUpdate();