richtextbox

Customized Rich Text Editor

Is there any way to build our own rich text editor something like the one in statckoverflow. If it is better use the ready made rich text editor's, which will be good enough. Requirements -Should load very fast. as fast as a text box -bold,italic,hyperlink,embedded image options should be there ...

Undo in RichTextBox does not undo Pasted Text

I have a WinForms RichTextBox and by default the Undo works for most things, but when I Paste some Text in (I have stripped it of formatting it is just plain text), and try undo it does not undo the text just pasted. Any help to a solution? ...

How to import a .rtf file to silverlight 4 richtextbox?

Hi, experts, I have a .rtf file and want to put it in a richtextbox in silverlight 4. Unfortunately we do not have .rtf property in silverlight 4 richtextbox, we only have .xaml. So what i did is to create a FlowDocument, than load the .rtf to this FlowDocument, then format it to xaml. then assigned it to richtextbox. But i got a argum...

img tag in RichTextEditor Adobe AIR

Hi, I wanted to insert an image into a RichTextEditor in AIR application. For my surprise I found this code working perfectly if the project was Web application but it doesn't work if I use it into AIR Desktop application. Here's the code <mx:RichTextEditor height="100%" width="100%"> <mx:htmlText> <![CDATA[ <p>Thi...

converting docx files to WPF flow documents

Hello, I have a word document with a few pictures and many lines of text (with headings) in it and want to convert this document to a flow document. So I can open it easily in my wpf application and use a rich text box to make it editable... I found this article useful. But I have some problems with adding images (Form the docx file) t...

WPF RichTextBox - How to detect merging of lines.

Hi, I am trying to detect and deal with edits in my RichTextBox. Some edits end up with two lines being merged into one. For example if the rich text box contained: line 1 line 2 Selecting from the beginning of "line 2" to the end of "line 1" and then pressing delete will result in: line 1line 2 I can detect the fact that the fir...

Does WPF RichTextBox support squiggly underline and inline images?

I need and editable component that supports these 2 features: inline images squiggly underlines that can have custom collor (different to text above them). Does WPF RichTextBox support that? If not, what does? ...

Finding the char index of a Font Style in a RichTextBox

I'm looking for an efficient way to find the character indexes of different font styles in a RichTextBox. I have the following: for (var i = 0; i < index; i++) { _activeCopyBox.Select(i, 1); if (!linkFound && _activeCopyBox.SelectionFont.Underline) underLineFound = true; } This however is very slow as it has to select ea...

Binding a WPF RichTextBox to a styled XML document, on-the-fly.

Alright, so, here is the scenario: I am outputting the result of a console app (in my case, MSBuild) and it has colors. I want to use those colors, or at least some colors, in a RichTextBox on my WPF page. I successfully have it routing the output to the RTB and it works great by adding new inlines. It's fast and efficient. The problem...

VB.net - Change Background of Disabled Form Element

I have a rich text box that I want to show as un-editable and un-selectable text. If I set Read-Only to YES and Enabled to NO, then I get the desired effect... ...except disabling the control changes the background color to the washed out grey. I'd like to keep the background color white. I have tried: RichTextBox.BackColor = Color.W...

WPF RichTextBox: Templates for content?

Hi I'm learning WPF and specifically the RichTextBox via an intellisense-type application. As the user types stuff in, I am wanting to change the appearance of certain words. I'm not really sure what is the best way to do it (I mean the formatting as opposed to the parsing). Ideally (I think) I'd like to do as much as I can in XAML ...

WPF/MVVM: RichTexBox as datagrid cell editor, put formatting code into ViewModel ?

I really wonder what I can put in the ViewModel. If its needed to be tested might some say... But when the properties like CaretPosition (to get the selected Text) are no dependency properties, then better forget about the ViewModel. At the moment I have this in the codebehind: private void rtbContent_SelectionChanged(object sende...

WPF: Attached behavior is registered but never called?

Hello all, trying my first attached behavior: I want to bind the TextSelection of the RichTextBox to my ViewModel`s property: public TextSelection SelectedRichText {get;set;} That way I bind it: <RichTextBox behavior:RichTextBoxSelectionBehavior.RichTextBoxSelection="{Binding SelectedRichText}" /> Thats my code and I have 2 quest...

How do I switch off this part of CK editor?

How do I switch off this bottom bit? Can't seem to find it in the docs, can do just about everything else... config.??? = false; Answers on a postcard boys and girls. :D ...

Setting the xaml of the Silverlight 4 RichTextBox

I can retrieve the xaml with rtb.xaml.ToString() and store it in a database. But how do I set it? As an example, I thought rtb2.Xaml = rtb.Xaml would work. ...

How do get the current line text to cursor from a Silverlight 4 RichTextBox Control

In the Winforms RichTextBox control I have previously used the GetLineFromCharIndex method and the GetFirstCharIndexOfCurrentLine to work out the start and end points of the typed text on he current line. I am struggling with the new RichTextBox control in Silverlight 4 as there doesn't appear to be equivalent methods. GetPositionFromPo...

Printing Silverlight 4 RichTextBox content

I am using Silverlight 4 RichTextBox to capture data that will be printed. My problem is when I print using the code below the border surrounding the RichTextBox is also printed, even when BorderThickness is set to 0. PrintDocument theDoc = new PrintDocument(); theDoc.PrintPage += (s, args) => { ...

Is it possible to "zoom" the text in a WPF RichTextBox?

I noticed the WinForms RichTextBox has a ZoomFactor property that I assume is exactly what I want--unfortunately this seems to be entirely missing on the WPF variant. Is there any way I can achieve the same functionality (increasing/decreasing the visible text size of the whole document without actually changing the underlying RTF)? Up...

Rich text box in an Office 2007+ ribbon control

I want to have a rich edit control on an Office 2007+ ribbon control from within an Office add-in. There is no rich text box in a VS2010 designer Toolbox. Is there a way to put a custom control in a ribbon or is there any other less straightforward way to accomplish this? ...

A working solution for subscript/superscript in RichTextBox in Silverlight?

Has anyone successfully implemented a workaround for changing a selection of text in Silverlight RichTextBox to superscript/subscript? In WPF, I would do MyRichTextBox.Selection.ApplyPropertyValue(Inline.BaselineAlignmentProperty, BaselineAlignment.Superscript); This is not directly supported in Silverlight and I found a suggestion ...