richtextbox

Silverlight 4 RichTextBox - InlineUiContainers disabled

I've been following the Silverlight text editor sample with interest. It gives me a lot of functionality such as formatting, clipboard support, printing etc. The sample also allows for DataGrids to be inserted by using an InlineUiContainer. My problem is that the inserted DataGrid is disabled while my requirement is that the user can e...

Serializing WPF RichTextBox to XAML vs RTF

I have a RichTextBox and need to serialize its content to my database purely for storage purposes. It would appear that I have a choice between serializing as XAML or as RTF, and am wondering if there are any advantages to serializing to XAML over RTF, which I would consider as more "standard". In particular, am I losing any capability ...

Open Source Web Rich Text Editor

Which is the best open source web rich text editor and why? I have used the YUI editor before, but I am looking for something more extensible and manageable and that will ultimately prove more stable. ...

In WinForms Application control + C is not doing a copy on my rich text box.

I added a menu with short cut keys for copy and past (Control+C & Control+V) on a windows forms application. The application has a single richtextbox control. The events for the menu items call RichTextBox.Copy and RichTextBox.Paste but I can't get the short cut keys to work. Control+c & +v do nothing. Is there a step I am missing? ...

markItUp! (jQuery text editor) - How to make a costum preview page in PHP

I have a question about markItUp!'s preview function. Inside jquery.markitup.js i have these settings: previewTemplatePath:'~/templates/preview.php', previewParserPath:'~/templates/preview.php', previewParserVar:'data' I'm not sure what to do with previewParserPath and previewParserVar. Is it possible to grab the content sent by mark...

Is it possible to style text in a richtextbox at design time?

I have a System.Windows.Forms.RichTextBox that I wish to use to display some instructions to my application users. Is it possible to set some of the text I enter at designtime to be bold? Or do I have no option but to do it at runtime? ...

Rich text edit control for C++?

Hi, I'm looking for a control to edit rich text. These are my requirements: Fast/lightweight Support for bulleted/numbered lists Colored text and highlighting targeting Windows, but cross-platform would be a bonus Fine control over undo/redo and easy way to monitor what parts of the documents have changed All the other usual feature...

RichTextBox Vertical Scrollbar manipulation in visual studio.

I've searched through related questions but can't find what I need. I have a richtextbox control. I need to trigger an event when the vertical scrollbar reaches a certain position (say 90% down to the bottom). I've been playing around with the events for the rich textbox but have yet to find anything. Any help would be greatly appreci...

C# Moving Cursor in RichTextBox on Right-Click

I have a RichTextBox control. When you left-click in the text the cursor jumps to where you clicked. I want this to happen when I right-click as well. I'm not sure how to do this. Thanks! ...

RichTextBox No Border

Hello, Based on what Word, Wordpad, and Open Office Writer are showing there is no cell border which is correct. But in the RichTextBox control the borders are displayed. I need to hide the borders of the table/rows/cells in the richtextbox. Any help would be greatly appreciated. Please see the sample below for RTF. {\rtf1\ansi\deff...

Silverlight 4 RichTextBox - can't restore Xaml with text containing curly braces

We have a Silverlight application using the RichTextBox as a rich text editor for the user to create emails. We actually have our own serializer but essentially we are saving and restoring the Xaml. As far as I can tell it is impossible to restore any text containing curly braces. You can demonstrate this fairly easily by creating a Ri...

Inheriting a Base Form but Paste/Cut Commands Not Captured

I created a base form that has a specific size and an icon as a base for all forms created in my project (to be consistent in looks). The problem is, for some reason if I add a Text box to the Child form, I can no longer execute shortcuts like Copy (CTRL+C) etc into the Textbox. What should I do to handle this OTHER THAN writing code to...

.NET RichTextBox: unable to change Rtf property.

Hey guys, Perhaps I'm missing something real simple here, but I've been struggling to change the RTF property of my RichTextBox in order to apply some color coding to my text. Probably the most straight-forward example of the problem I'm having is setting the Rtf property to include a color table in its header. The default RTF string r...

C# RichTextBox - Partially setting DetectUrls=false

Hi, I have this RichTextBox and I have embedded some http links in it. I have set DetectUrls = true, and it displays the links correctly and handles in the event. In the same RichTextBox, I have one more string displayed which looks like this Type http://< Your host name> Now, since DetectUrls= true, the portion "http://<" is dis...

Force Richtextbox scrollbars to refresh

This question is about WinForms RichTextbox. I have a RichTextbox with ScrollBars property set to Vertical. I change it's RTF contents from the code and sometimes the vertical scrollbar appears disabled - when it should be enabled. This should never happen - the scrollbar should be either enabled, or not shown at all. (I had a similar...

How to keep track of TextPointer in WPF RichTextBox?

I'm trying to get my head around the TextPointer class in a WPF RichTextBox. I would like to be able to keep track of them so that I can associate information with areas in the text. I am currently working with a very simple example to try and figure out what is going on. In the PreviewKeyDown event I am storing the caret position and ...

Using GetLineStartPosition to get the end of a line in WPF RichTextBox.

A bit of background. I would like to be able to process text for the line that the caret is on in a WPF RichTextBox. Please see my earlier question about the TextPointer class: http://stackoverflow.com/questions/3046162/how-to-keep-track-of-textpointer-in-wpf-richtextbox. I know how to get the TextPointer at the start of the current lin...

Fastest way to store an ascii file's text in a RichTextBox?

I have some ascii files that are 60-100MB in size. I want to store one of these in a control in Visual C# as quickly as possible. I've been googling for answers and I've found a few solutions such as putting the file into a stringbuilder and then converting that to a string and storing it in the rtb. The solution I have found thus far us...

Adding text in a new line in WPF RichTextBox at runtime

I want to add some text in a WPF RichTextBox at runtime in a new line. I can do this using: FlowDocument mcFlowDoc = new FlowDocument(); mcFlowDoc = richTextBox.Document; Paragraph pr = new Paragraph(); pr.Inlines.Add(status); mcFlowDoc.Blocks.Add(pr); StatusText.Document = mcFlowDoc; But there is too much of a gap between two lines. ...

Saving richtextbox data inside a database along with the formatting

I have a rich text box in one of my applications (WPF). Now I want to store the data of the rich text box along with its formatting (e.g. bold, colored etc.) into a database (SQL Server). Currently I am storing the whole XAML of the text box in a database field. however, I am not sure whether this is the right approach. Looking forward t...