Unplanned
Last Updated: 07 Dec 2022 12:11 by ADMIN
ADMIN
Petya
Created on: 19 Dec 2013 10:50
Category: RichTextBox
Type: Feature Request
10
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: 

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

Workaround: 
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;
dummyCell.Blocks.Add(dummyParagraph);
row.Cells.Add(dummyCell);
table.Rows.Add(row);
			
editor.InsertTable(table, shouldInsertParagraphBeforeTable: true);            
this.radRichTextBox.Document = document;

----------------------------------------------------
4 comments
ADMIN
Dimitar
Posted on: 07 Dec 2022 12:11

Hi Stefano,

I offer my sincerest apologies on behalf of the entire team for the trouble this missing feature has caused you! 

Our team is devoted to providing the best experience to our users, which includes fixing bugs and implementing features that affect the most clients. This is why we rely on our public Feedback Portal where our community can provide feedback for the ones we need to prioritize. 
We do our best to fix all bugs, yet some receive less attention than others, which is why they can sometimes be delayed, such as this one. As much as I'd like to share an ETA on its resolution, currently, none is available, so I would not want to mislead you. Once we resolve this bug, we will immediately update the public feedback page to notify you and other clients.  

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Stefano
Posted on: 06 Dec 2022 08:01
Upvoted. Too bad this was last updated in 2018😥
ADMIN
Boby
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: https://feedback.telerik.com/Project/143/Feedback/Details/136676-richtextbox-implement-support-for-page-paragraph-borders .
Ludovic
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.