Generate HTML from a plain text - c#

I have a desktop application displaying text in a read only RichTextbox component. Some words in the text needs to be highlighted depending on a text analyze that was previously executed.
Now I need to create a web version of this application.
I know there's a couple of Rich Text Editors available but I would like to know if there's a library or a simple way to generate an properly tagged HTML string from a plain text and a list of word to highlight?

Here you have a free extension to RichTextbox that do what you want:
http://www.codeproject.com/Articles/12172/An-extended-RichTextBox-to-save-and-load-quot-HTML

You can use TinyMCE. This is free javascript based Reach Text Editor for the web.
TinyMCE Reach Text Editor

Related

How would I be able to take in Rich Text from a user on a Web Page, store that rich text, and then output the stored rich text into a Word Document?

Currently, I'm using a page which utilizes a WYSIWYG editor (SummerNote) to allow me to extract the Rich Text which is copy pasted into the editor (the user will basically copy in anything from a word document to it). This is then output as a html string, which I can then convert back to RTF using SautinSoft.HtmlToRtf, however, this does not output exactly the original Rich Text content that was pasted into the editor.
Does anyone have any ideas of how to deal with this or tools available for this?

How to implement CKEditor or HTML Editor in xamarin forms?

I am building mailing system, I want html editor for message body which convert html text to plain text and show in Editor plain text and while sending mail in again convert plain text to html text.
This is a control that is not delivered with stock Xamarin.Forms. So you need to either find a native counterpart, which I'm not sure there is, or roll your own. The nice people at Xam Consulting came up with the TEditor here.
Maybe that does what you want? Or in the least, it is a nice starting point to start working from.

Edit Word template in C#

I'm stuck in a project for school.
I have a word template, this is a empty document but it has some formatting, for example, each page has 25 lines, the font is Times New Roman and its size 12.
What I have to do is to open this template, write information and save it. When I open the template I should see the text displayed respecting the format.
How can I do this? I tried DocX library but I couldn't make work Line Spacing feature.
You can user whatever you want to make it work. It must be in C#.
Does it need to be C#? Maybe they want you to use vba?

How to read and write in content control rich text of MS Word in c#?

I have a table in ms word , which contains a content control Rich Text (Which can be added by using developers ribbon) in cells.
I want to read and write text in Rich Text using window c# .
I was trying to read fields by
wd.ActiveDocument.FormFields.Count.ToString()
You can use office interop api s to explore word files.
Look into the following link,
http://msdn.microsoft.com/en-us/library/dd264733.aspx
Very urgent and very little detail
You don't say Forms or WPF
Not going to read and write to MS Word in .NET without a 3rd party control to my knowledge
FlowDocument has rich formatting but is limited to WPF.
RichTextBox can be used to edit a FlowDocument.
FlowDocument

C# wysiwyg editor for a custom language

I need to build a visual editor in C#. Given a piece of PHP and/or HTML code, the software will display them in the form of an editable webpage. At the same time it will display a dialog box from where the user should be able to edit options for the selected component. It is pretty like Adobe Dreamweaver's HTML editor but it needs to have the added functionality of handling PHP in it. (Dreamweaver parses HTML and just allows PHP segments while this program has to parse HTML as well as PHP).
I can build the dialog box stuff with functionality but my biggest problem is to create the WYSIWYG editor. Any suggestions/comments where I should start from?
Thanks in advance.
UPDATE
Basically it has to parse only a (very) small subset of PHP functions. Plus it has to parse some custom hard-coded functions. An example to parse out would be:
html here
...
...
<php echo $this->input(option1, option2, option3); ?>
...
more html here
This would show GUI to display a form field as it would show up in a browser.
Similarly there will be some other functions (less than 150) that need to be parsed out. Other built-in PHP functions don't need to be parsed except some string manipulation functions.
Take a look at TinyMCE. It's a javascript WYSIWYG editor, and supports plugins and customizations. There seems to be a php plugin availble as well on SourceForge.
If you want this in a WinForm or WPF app, you can embed it thru the WebBrowser control available.
[Edit: Rich Text Control]
You might can build on the code from this CodeProject. It extends the richtech box.
Also check out ModelText for winform which says it can parse HTML (created by https://stackoverflow.com/users/49942/chrisw). Not sure if it's extensible though.

Categories

Resources