1 Open RadRichTextBox and press Windows + . to to show the emoji box.
2 Choose the emoji and press backspace to remove it.
Actual behavior: When you press the backspace to remove the emoji, a square is left
Expected behavior: When you press the backspace the emoji should be deleted.
This element specifies the presence of a symbol character at the current location in the run’s content. It is similar to the sym element and is used to add emojis to the document content. The symEx element is not defined in the Office Open XML specification but it is part of the extensions of MS Word to the Office Open XML.
Currently one can insert emojis by pressing "Ctrl + .". However, the emojis are inserted in black and white.
The AddParagraphToSelection method adds the first row of a table when it is the element after the paragraph.
To workaround this manually select the paragraph:
var para = caret.GetCurrentParagraph(); DocumentPosition pos = new DocumentPosition(doc); pos.MoveToDocumentElementStart(para); selection.AddSelectionStart(pos); pos.MoveToDocumentElementEnd(para); selection.AddSelectionEnd(pos); this.radRichTextBox.Delete(false);
Add support for Paragraph and Page borders. Note: Typing "---" in MS Word and pressing Enter inserts bottom paragraph border with special size (sz="6" in the docx format). Workaround for inserting visually similar element: 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.rtb.Document = document; ----------------------------------------------------
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; ----------------------------------------------------
In MergeFields the general switch may be used to format the Result Text. The text may appear in lowercase, uppercase, title case and so on.
DeleteAnnotationRange fails to execute when the content is uneditable annotation. For example: PermissionRange with a checkbox content control inside.
A possible workaround would be to manually delete the annotation range from the document element tree:
var rangeEnd = rangeStart.End;
var endParent = rangeEnd.Parent;
if (endParent != null)
{
endParent.Children.Remove(rangeEnd);
}
var parent = rangeStart.Parent;
if (parent != null)
{
parent.Children.Remove(rangeStart);
}
this.radRichTextBox.UpdateEditorLayout();