I'm opening a Word (docX) document in the rich text editor, and it seems to open with none of the Styles from the original document in it.
So the document formatting looks strange: the default font seems be called '"NSimSum", and heading are in 'Sitka Banner'.
This MAY be linked to a strage thing in the document.StyleDictionary. It doesn't like iterating through the StyleDefintions:
For example
for each Styles.StyleDefintion in document.StylesRepository
...does not work
dim firstStyle as Styles.StyleDefintion in document.StylesRepository.first
...is ok
so I am using:
dim styleDef As Styles.StyleDefinition = document.StyleRepository.ElementAt(i)
...which is OK, but strange
Are these two things connected? Am I missing something ?
Thanks
we are using the RichTextEditor to display a DOCX file. HOwever, I can not for the life of me figure out to remove/close the document once it has been assigned to the Document property on the RichTextEditor control. I know this is probably simple, but I am just not seeing anything like a CLOSE(), EXIT(), CLEAR() and Setting Document = null crashes.
TIA
Mark
Hello,
Telerik have demo Richtexteditor - Document API project example with 3 buttons (bold, italic and underline) . Can you please send me any example or project how to add there two FlowDirection buttons (LTR and RTL) with toggled states as in the first look realization?
Thank you!
Is there a way to hide the File -> New Menu Option?
I tried this but it returns "Nothing" indicating the backstageTabItemNew item wasn't found.... maybe there's another name for it?
Dim FileNewItem As BackstageTabItem = TryCast(Me.RichTextEditorRibbonBar1.RibbonBarElement.BackstageControl.Items("backstageTabItemNew"), BackstageTabItem)
I'm capturing the event below
Private Sub RadRichTextEditor1_CommandExecuting(sender As Object, e As Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs) Handles RadRichTextEditor1.CommandExecuting
If TypeOf e.Command Is SaveCommand Then
If e.CommandParameter = "pdf" Then
'allow export to pdf
Else
e.Cancel = True
End If
End If
End Sub
I was hoping to find
If TypeOf e.Command Is SaveASCommand - but from what I can see, that doesn't exist.
The problem is - if the user clicks the Save Button or BackStage Save - I'm doing special processing to the database.
But if they click on Save As - It indicates that the user wants to 'export' the document to a pdf or to a word .docx
But in both cases - e.command is always SaveCommand.
It would have been nice to have a (1) SaveCommand and (2) SaveAsCommand
Anyway, is there any event that I can tap into so that these 2 methods can be dealt with differently?
I did add a handler for the SaveButton itself... and that works just fine.
AddHandler RichTextEditorRibbonBar1.QuickAccessToolBarItems(0).MouseDown, AddressOf SaveButton_MouseDown
Maybe you can show me how to create an addhandler for the BackStage Save Menu Option
And
For the BackStage SaveAs Menu Option
That would be of great help and probably solve my special handling needs.
The ribbon bar has a save button... and I'd like to add special behavior when the user clicks the save button.
Is there any way to intercept or override (with add handler perhaps) the save button click event?
I have a document generator which currently generates Word documents, and I’d like to replace it with the RichTextEditor control.
Has anyone tried anything like this? I’ve already replaced Excel with the RadSpreadsheet, and that was OK, albeit with a few restrictions, but the performance improvement made it worthwhile. But the Word generator is way more complicated, and uses all kinds of Word features, so just wondering if there are any gotchas.
Thanks
Hi Team,
We are planning to migrate Telerik.WinControls.RichTextEditor.dll (2023.1.314.40) in visual studio 2022.
We are unable to compile the program and getting an errors like below.
What is an equivalent namespaces for following references? Could you please help on this below?
Note: Its working fine in the Telerik.WinControls.RichTextBox.dll (2013.3.1127.40)
example program:
private void InitializeCurrentFontStyles(StyleDefinition styleDefinition) { try { UnderlineType underlineType = (UnderlineType)styleDefinition.GetPropertyValue(Span.UnderlineTypeProperty); this.radBtnUnderlineStyle.ToggleState = underlineType != UnderlineType.None ? ToggleState.On : ToggleState.Off; string fontFamiliy = (string)styleDefinition.GetPropertyValue(Span.FontFamilyProperty); this.radDropDownListFont1.SuspendSelectionEvents = true; this.radDropDownListFont1.Text = fontFamiliy; this.radDropDownListFont1.SelectedValue = fontFamiliy; this.radDropDownListFont1.SuspendSelectionEvents = false; float fontSize = (float)styleDefinition.GetPropertyValue(Span.FontSizeProperty); fontSize = (float)Math.Round(Unit.DipToPoint(fontSize), 1); this.EnsureFontSize(fontSize.ToString()); TextStyle fontStyle = (TextStyle)styleDefinition.GetPropertyValue(Span.FontStyleProperty); this.radBtnBoldStyle.ToggleState = fontStyle.HasFlag(TextStyle.Bold) ? ToggleState.On : ToggleState.Off; this.radBtnItalicStyle.ToggleState = fontStyle.HasFlag(TextStyle.Italic) ? ToggleState.On : ToggleState.Off; } catch (Exception ex) { RadMessageBox.SetThemeName("Office2007Silver"); RadMessageBox.Show(ex.Message, res_man.GetString("ProposalEntityMaster", PNxt_BL.Common.CultureInfo), MessageBoxButtons.OK, RadMessageIcon.Error); } using (InsertTableForm insertForm = new InsertTableForm()) { insertForm.Owner = this; insertForm.ThemeName = "Office2007Silver"; if (insertForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.radRichTextBox1.InsertTable(insertForm.RowsCount, insertForm.ColumnsCount); } } this.radRichTextBox1.DocumentView.Caret.Hide(); }
Thanks,
Rajkannan
Hello,
When i put the simplified layout on the ribbon bar to On, the radRichTextEditor who is associated stay stays in its place instead of sticking to the ribbon. That's a lot of wasted space. How do I do this? i don't find the property ...
i found an exemple here : Nouvelle barre de ruban simplifiée moderne dans Telerik UI pour WinForms
That is exactilly what i want
Thank you (and sorry for my english !)
I need a Solution for export Thai (or any other complex Language) document as pdf. Is there any solution for now?
I'm using Telerik rich Text editor for windows form