This is a migrated thread and some comments may be shown as answers.

Using RichTextEditor as an HTML Editor?

1 Answer 318 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Apr 2018, 10:55 AM

Hello,

I would like to have a RichTextEditor box and above it a few simple buttons (bold, underline, justify left etc etc..).  I would like to be able to type in the box and, for example, highlight a word and click the BOLD button to make that word bold.

I would like a SAVE button (or output for testing) that I can use to save the text in the box to a database but in HTML so the bold work could show as <b>The word</b>

Basically I would like to write a small program to update part of my website by saving the HTML text into a database for my website to read.

How can I set RichTextEditor to be an HTML editor?

Apologies if this has been answered elsewhere, I am new here!

Thank you in advance,

Mark

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 18 Apr 2018, 11:47 AM
Hello Mark,

Thank you for writing.

You can achieve the desired functionality by combining the RadRichTextEditor and RadCommandBar controls. We also have a Ribbon UI which can be associated with a particular editor but for a scenario like yours, I think the command bar would fit better. We also have an example in our demo application handling a similar setup, please check the RadRichTextEditor Command Bar UI example. The demo application is installed automatically along with the controls and the source code of the examples is in the installation folder. 

In order to load and save HTML documents, you will need to use the HtmlFormatProvider class. The following section of the documentation provides detailed information how documents can be imported/exported and what is supported: https://docs.telerik.com/devtools/winforms/richtexteditor/import-export/html/settings.

I hope this helps. Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
RichTextEditor
Asked by
Mark
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or