richtextbox

How to do Selection Alignment using the RichTextBox in Silverlight 4?

I cannot seem to figure out how to do a Selection Alignment in the new RichTextBox, I have an idea that I need to convert the selection into the Paragraph type which supports alignment, but cannot seem to figure this out. None of the Silverlight examples have this, but I'm sure it is possible. I have this code, that does not work - as I ...

contentEditable cursor position/style in FireFox

I'm having trouble using contentEditable in FireFox 3. I have a problem where the cursor will appear above or only partially in the div after I click in it (until I start typing at which time it behaves correctly). Any ideas on how I can stop this from happening? HTML: <html> <head><title>Test Page</title></head> <body> <div...

Silverlight RichTextBox Anchoring of Content

I'm trying to find out how to anchor all of the content in a RichTextBox control to a particular location, for example: horizontal = center and vertical = center. I can horizontally align paragraphs, but not all of the content in the control itself (which anchors at top/left by default). It appears, from the documentation that <VerticalC...

Create a Auto-sized RichTextBox in Custom WPF control (VB.NET)

I have previously used the arguments of a contentsResized event on a Winforms richtextbox to get the new size of my RTB. I am now developing a WinForms app with a custom WPF RichTextBox. My whole reason for doing this is to use the out-of-the-box spellchecker. I need my RichTextBox to expand and collapse vertically as the text is chan...

How to get value from contentEditable div in IE

I'm trying to create a very simple contentEditable div input. However, any way that I can think of to get the value of the input is not exactly what the user typed in IE because whitespace is collapsed. i.e. "hello world" becomes "hello world". But it's important to me that I be able to get the text as the user has typed it if at all...

c# RTB - paste plain text without colours/fonts?

Hi, I am using Rich Text object in my C# application. The only issue I am having is that when user pastes formated text from another app, it remains formated which I cannot have. Is there any way how to paste only string and ignore formatting? Thanks! ...

Handle Silverlight 4 RichTextBox Paste event

How can I handle the Paste event for a RichTextBox control in Silverlight 4? (I want to be able to copy-paste images - the Clipboard in SL4 supports only text, so I'm sending the ImageSource Uri, and on the Paste event I want to load the image in the RichTextBox instead of the Uri string). ...

Rich Text Box. .NET 2.0 Content formatting.

I have a small windows client application data bound to a single table backend. I created a DataSet using the wizard in VS 2005, and it automatically create the underlying adapter and a GridView. I also have a RichText control and bound it to this DataSet. All well so far but, I need to replace certain characters(~) on the fly before the...

C# WebBrowser stops focus on richtextbox

Hi, I have problem with WebBrowser component. For some reason, when I click into it, it disables me from setting focus on richTextBox. I have 2 almost the same forms. Main difference between first and second form is, that form1 is modifying WebBrowser DocumentText and form2 is using webBrowser to display content of temporary file. F...

formatting text in richtextbox

hi every body i am building a chat system i want if user send a message or recive a message the color of the nickname is blue in the richbox ...

Html rich text editor and read-only content?

Hello I'm looking for a way to make specific elements in a Html rich text editor read-only and not possible to modify by the user. Is there any way to achieve this behavior? An example of the rich text editor Im refering to would be this code snippet: <html> <head> <script type="text/javascript"> var Editor = { Init: functi...

How do you load and save content from a Silverlight 4 RichTextBox control?

I've been reviewing the features of the RichTextBox control in Silverlight 4. What I've yet to find is any examples of Loading and Saving content in the RichTextBox. Anyone come across any or can shed some light on it? The control has a BlocksCollection in which I guess one could use the XamlReader to load a bunch of markup assuming t...

System.executionengineexception in wpf

Dim lPropertyInfo As PropertyInfo Dim lSecondLevelPropertyInfo As PropertyInfo Dim lPropertyValue As String = String.Empty Dim lSecondLevelPropertyValue As String = String.Empty Dim lMainParagraph As Paragraph Dim lSubParagraph As Paragraph Dim lFormatAvailable 'As CustomStyle Dim lCollection As New Collection(Of String) ...

Wpf Richtextbox clear error

Dear Friends, When I run this code, I get the following error .. system.Executionengineexception. Can anyone guide me as to what I might be doing wrong? Thanks Dim lMainParagraph As Paragraph Dim lDelimiter As String = String.Empty Try For x As Integer = 0 To 1 lMainParagraph = New Paragraph ...

C# 2 controls, both need to catch diffrent keypresses, even while one has no focus.

Hey, I'm trying to make some sort of intellisense look a like for an editor I'm working on. When the user types in the richtextbox and the letters match a word a listview will pop-up and the matched word will be selected. the problem is the focus is still on the richtextbox so all the key presses will go to that control, which is good...

Rich text editor in JQuery dialog box

I'm trying to get a rich text editor in a jquery dialog box. I'm currenty trying tiny mce. When I don't initialize tiny mce the text area displays the text with the HTML characters. When I do initialize tiny mce nothing is displayed in the text area. Any ideas on how to get a text editor in the dialog box? <textarea id="reason" rows="...

Anyone know of a good Rich Text Edit Control for .NET?

There seems to be a ton of ASP.NET RTE controls, but I can't seem to locate any good WinForm RichText controls for .NET. The one that cones stock with Visual Studio 2008 does not have any toolbar for choosing font, bold, italics, underline, alignment, etc. A free control would would obviously be preferable, but I don't mind paying a litt...

How to add data into RichTextBox from two datasourses in WPF

I need to put data from two different datasourses in the same textbox. The text that comes from the first one have to be bolded and the secound normal. It's there a possibility to do this in WPF? ...

WPF RichTextBox - how can i get all linebreaks/wrappings?

Hello, I need to render some rich text to a pdf. The difficulty is, i need the text on the pdf to look exactly like the text in the WPF RichTextBox. The pdf renderer i'm using renders according to html, so converting from richtext to html sometimes causes lines to wrap/break at different points. Is there any way to get the text from t...

WPF RichTextBox TextChanged event - how to find deleted or inserted text ?!!

While creating a customized editor with RichTextBox, I've face the problem of finding deleted/inserted text with the provided information with TextChanged event. The instance of TextChangedEventArgs has some useful data, but I guess it does not cover all the needs. Suppose a scenario which multiple paragraphs are inserted, and at the sa...