Export to HTML question

SyntaxEditor for Windows Forms Forum

Posted 12 years ago by ori
Version: 4.0.0258
Avatar
Hello,

I would like to write a static function that gets a code and a language name (CSharp, VB, and so on) and returns the with syntax highlighting in HTML format. I wanted to ask what is the best way to do it.

Thanks,
Ori

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The Document class has a GetTextAsHtml method that will use HTML markup to color the code using the current language. That should do what you want.


Actipro Software Support

Posted 12 years ago by ori
Avatar
Is there a way to use the document without the SyntaxEditor control? I don't really need the control, all I want it the syntax highlighting functionallity
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes the Document can be used independent of any SyntaxEditor.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.