HTML Colorizer for Xojo lets you build applications that allow you to display HTML code colorized. It is a great way to let your users examine and even edit HTML code in a Xojo application.
If your project deals with HTMLViewer showing Web pages, make it look more professional showing highlighted HTML source code with any Color Schemes you choose… in no time and on any TextArea control you choose! HTMLColorizer for Xojo highlights the HTML tags or keywords, attributes, entities, strings and comments.
Extremely easy to use, minimal footprint in the deployed executable, and fast, really fast!
- Full Source Code. No Chains!
- Extremely Easy to Implement and Use
- Free updates during one year
- Exclusive portal for Feedback / Feature Requests / Bugs submission and follow up
What is HTML Colorizer for Xojo
Use any regular or subclassed TextArea to colorize HTML code as you write or from the Clipboard! Use as many Color Schemes as you want changing between them in a snap! Implement this capacity in your current or new projects in seconds, using the already provided TextArea subclass of the example project as an starting point, or providing your own subclass or the regular TextArea control from the Xojo Framework Library! HTML Colorizer for Xojo is compatible with 32 and 64 bits deployments for Desktop, under MacOS, Windows and Linux!
What is Included
The HTMLColorizer class, the project example and a TextArea custom subclass that you can use in your own projects or as an starting point to implement your own TextArea subclasses! Everything in non-encripted form with access to full source code! In addition, you will receive all product updates during one year for free!
How it Works
In order to get a instance of the parser, you can use:
dim cHTML as HTMLColorizer = new HTMLColorizer( sourceTextAreaControl )
dim cHTML as HTMLColorizer = new HTMLColorizer( sourceTextAreaControl, colorScheme )
// colorScheme is a Dictionary with the keys specified by the HTMLColorizer Class
To colorize the current contents of the TextArea class or subclass instance, use:
In order to change the applied color scheme, use:
cHTML.Colors newColorScheme // newColorScheme is a Dictionary with the keys specified by the HTMLColorizer Class
In order to reset colors to the default color scheme:
Color Scheme Dictionary
In order to define the Default Color Scheme or to change the Color Scheme to apply to the HTML source code, you need to provide the HTMLColorizer instance a Dictionary with the following keys:
- HTMLColorizer.kGeneral. Comments and the opening and closing tag characters
- HTMLColorizer.kStrings. Color to apply to all the Strings in the source code
- HTMLColorizer.kKeywords. Color to apply to the HTML tags and keywords
- HTMLColorizer.kEntities. Color to apply to HTML entities
- HTMLColorizer.kAttributes. Color to apply to HTML tags attributes
For example, the following code creates a new Color Scheme and passes it to a instance of the HTMLColorizer class:
dim cHTML as HTMLColorizer = new HTMLColorizer( sourceTextAreaControl ) Dim d As New Dictionary d.Value(htmlcolorizer.kGeneral) = "&c292ff2" // Comments < and > d.Value(htmlcolorizer.kStrings) = "&cba226e" // Strings d.Value(htmlcolorizer.kKeywords) = "&c292ff2" // Keywords d.Value(htmlcolorizer.kEntities) = "&cFF0000" // Entities like the HTML © d.Value(htmlcolorizer.kAttributes) = "&cab4b0d" // HTML attributes cHTML.Colors d
If the Provided dictionary lacks one or more expected keys, then the HTMLColorizer class will raise an Exception that you can catch to deal with.
Read the HTML Colorizer for Xojo User License Agreement for developer use of this component.