Does anyone know if it is possible to enable some type of color coding of the HTML code in the editor. Something that would help distinguish HTML elements from actual content. Something like what is used by VS.NET and many other popular HTML editors.
3 Answers, 1 is accepted
answered on 23 Jan 2009, 04:07 PM
RadEditor does not offer the requested feature out-of-the box and we do not plan to provide support for it for the time being.
Nevertheless, RadControls examples framework features such a tool for its C#/VB/ASPX tabs underneath each example. The tool is delivered as source code and is available in the App_Code\QuickStart of the demos application (C:\Program Files\telerik\RadControls for ASPNET AJAX Q2 2008\Live Demos\App_Code\QuickStart)
What you could do is add the QuickStart folder to your own application's App_Code, and then a single line of code will do the trick, e.g.
Thanks for the reply. This is very helpful and almost solves what we'd like to accomplish. we're loading the content from a database , and not from a file but i was able to modify the source code sample to accomplish that task, however we still want the content to load initally in design mode, and only call the CodeViewerHelper method when the user switches to HTML mode. Is it possible for us to tie into some event being fired when the user switches to HTML mode?
answered on 26 Jan 2009, 05:07 PM
There is a RadEditor event (which was exposed as a server-side property in the latest Q3 SP2 2008 - build 2008.3.13.14) called OnClientModeChange.
You can use this event to detect editor mode change, but this alone will not be enough to achieve your goal. Please note that the editor's HTML area is a TEXTBOX element that is not able to display color-coded formatting.
In case you need to have the formatting color coded, you will need to show an editable IFRAME instead.
If you wish to go for this option, my suggestion is to implement this IFRAME solution (you can have the IFRAME somewhere on the page) and send it to us. Once we have a more or less working solution from you, we will add a couple of tweaks to have the IFRAME display instead of the default HTML TEXTAREA.
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.