In MS Word, text is hidden using the Home -> Font -> Font -> Effects -> Hidden.
In the Rtf format, such text is preceded (marked) with a '\v' tag. In OOXML, the tag is <vanish/>. The display: none; style from HTML is mapped to hidden text when document is converted to DOCX.
Add support for importing of imaged defined with VML's v:imagedata inside v:image or v:shape. Currently, such images are just skipped.
A possible workaround is to upgrade the documents to a newer DOCX compatibility setting (by re-saving them with MS Word for example), where such shapes are not allowed and are replaced with more modern constructs which the import of RadRichTextEditor supports.
To reproduce: Import a document which contains square brackets and fields (the document must use right to left language).
Copy some content and paste it in the editor. The PasteOptions dialog remains opened and if the user clicks the PrintPreview button an error occurs:
Stack trace:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.WinControls.RichTextEditor.UI.PasteOptionsPopup.OnRichTextBoxLayoutUpdated(Object sender, EventArgs e)
at Telerik.WinControls.Layouts.ContextLayoutManager.fireLayoutUpdateEvent()
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinForms.Documents.UI.DocumentPrintPresenter.Telerik.WinForms.RichTextEditor.IDocumentEditorPresenter.UpdateLayout()
at Telerik.WinForms.RichTextEditor.RadRichTextBox.<>c__DisplayClass653_0.<UpdateEditorLayout>b__0()
at Telerik.WinForms.RichTextEditor.RadRichTextBox.UpdateEditorLayout(Boolean focusCarret, Boolean updateCaretSize, Boolean async)
at Telerik.WinForms.RichTextEditor.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value)
at Telerik.WinForms.RichTextEditor.RadRichTextBox.Telerik.WinControls.UI.IPrintable.BeginPrint(RadPrintDocument sender, PrintEventArgs args)
at Telerik.WinControls.UI.RadPrintDocument.OnBeginPrint(PrintEventArgs e)
at System.Drawing.Printing.PrintDocument._OnBeginPrint(PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at System.Windows.Forms.PrintPreviewControl.ComputePreview()
at System.Windows.Forms.PrintPreviewControl.CalculatePageInfo()
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
Copy some text from the introduction docs page:
Paste in RadRichTextEditor from the Demo app:
Open the Demo application >> RichTextEditor>> First Look example and open and empty document. Keep a random key pressed. You are expected to observe delayed text input:
RichTextEditor: Lists are always exported to HTML with Verdana font.
Changing the normal style or setting the DocumentInheritsDefaultStyleSettings has no effect.
To reproduce:
this.radRichTextEditor1.Text = null;
Use the code below.
1. Click the first button to insert a link.
2. Click inside the link to move the cursor.
3. Click the second button to insert the yellow rectangle
4. Click the third button to export the HTML content.
Actual result: StackOverflow exception occurs
private void radButton1_Click(object sender, EventArgs e)
{
HyperlinkInfo info = new HyperlinkInfo()
{
NavigateUri = "http://www.google.com",
Target = HyperlinkTargets.Blank,
IsAnchor = false
};
this.radRichTextEditor1.InsertHyperlink(info, "www.google.com");
}
private void radButton2_Click(object sender, EventArgs e)
{
LightVisualElement button = new LightVisualElement();
button.Text = "My Button";
button.DrawFill = true;
button.BackColor = System.Drawing.Color.Yellow;
button.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
Section section = new Section();
Paragraph paragraph = new Paragraph();
InlineUIContainer container = new InlineUIContainer();
RadElementUIContainer radContainer = new RadElementUIContainer(button);
container.UiElement = radContainer;
container.Height = 25;
container.Width = 70;
paragraph.Inlines.Add(container);
section.Blocks.Add(paragraph);
RadDocument doc = new RadDocument();
doc.Sections.Add(section);
radRichTextEditor1.InsertFragment(new DocumentFragment(doc));
}
private void radButton3_Click(object sender, EventArgs e)
{
Telerik.WinForms.Documents.Model.RadDocument document = radRichTextEditor1.Document;
Telerik.WinForms.Documents.FormatProviders.Html.HtmlFormatProvider provider = new Telerik.WinForms.Documents.FormatProviders.Html.HtmlFormatProvider();
provider.ExportSettings.InlineUIContainerExporting += ExportSettings_InlineUIContainerExporting;
provider.ExportSettings.DocumentExportLevel = Telerik.WinForms.Documents.FormatProviders.Html.DocumentExportLevel.Fragment;
provider.ExportSettings.ExportFontStylesAsTags = true;
provider.ExportSettings.SpanExportMode = Telerik.WinForms.Documents.FormatProviders.Html.SpanExportMode.DefaultBehavior;
string htmlValue = provider.Export(document);
webBrowser1.DocumentText = htmlValue;
}
private void ExportSettings_InlineUIContainerExporting(object sender, Telerik.WinForms.Documents.FormatProviders.Html.InlineUIContainerExportingEventArgs e)
{
}