Last Updated: 31 Oct 2018 07:51 by ADMIN
Created on: 19 Dec 2013 10:50
Category: RichTextBox
Type: Feature Request
RichTextBox: Implement support for Horizontal Line
In MS Word, there is special command in Home -> Paragraph -> Borders dropdown -> Horizontal Line, which inserts special drawing similar to 3D horizontal line in a paragraph. Such line should be exported to <hr> tag during HTML export, and respectively <hr> tag should be imported as Horizontal Line.

Note: the representation of the horizontal line in the docx document is as follows: 

          <v:rect id="_x0000_i1027" style="width:0;height:1.5pt" o:hralign="center" o:hrstd="t" o:hr="t" fillcolor="#a0a0a0" stroked="f"/>

Currently, you can add a horizontal line using a table with a single border. Here is some code demonstrating how to do this:


var document = new RadDocument();
var editor = new RadDocumentEditor(document);

Table table = new Table();
var topBorder = new Telerik.Windows.Documents.Model.Border(1, BorderStyle.Single, Colors.Red);
var borders = new TableBorders(table.Borders.Left, topBorder, table.Borders.Right, table.Borders.Bottom);
table.Borders = borders;

var row = new TableRow();
var dummyCell = new TableCell();
var dummyParagraph = new Paragraph();
dummyParagraph.FontSize = 0;
dummyParagraph.LineSpacing = 0;
dummyParagraph.SpacingAfter = 0;
dummyParagraph.SpacingBefore = 0;
editor.InsertTable(table, shouldInsertParagraphBeforeTable: true);            
this.radRichTextBox.Document = document;

Posted on: 24 Feb 2017 13:43
The item was improperly logged too broad, including Page/Paragraph borders feature (which is inserted when "---" is typed in MS Word), so some of you may want to vote for or follow the respective item instead of this one: .
Posted on: 22 Jul 2014 12:25
We use the RadRichTextBox to display and edit emails. The horizontal line is the common separator between replys and the fact that it's not shown makes it harder for the user to read the document. The implementation of this feature would be appreciated.