Timothy Robbins
Top achievements
Rank 1
Timothy Robbins
asked on 11 Feb 2008, 08:34 PM
Is there a way to make the editor recognize asp.net tags and not strip them?, I could live without the syntax highlighting, but if I could attach an xml file to do that as well, that would be neat.
Is there such a thing, is it on the burner, or am I foolish to hope for such a thing?
Is there such a thing, is it on the burner, or am I foolish to hope for such a thing?
5 Answers, 1 is accepted
0
Hello Timothy,
RadEditor is a client-side browser tool, providing the ability to visually edit pure HTML text using the underlying Rich Text Editing engine of the browser. This browser engine supports only standard HTML/XHTML tags and plain text.
Please, note that if you put a server tag in RadEditor the editor will not strip the tag, but will not render it in Design mode.
The ASP tags are not HTML tags and the browser is not able to visualize them. The browser cannot visualize XML Tags and when you put <asp:button> in the editor, the server-side framework will not parse the content (as it is part of the editor, not part of the page).
So, instead of sending to the client the HTML tag <input type=button> it will send <asp:button> - which means nothing to the browser.
To understand the situation better, please create a new HTML page with extension .html and add your server tags conent you put to the browser and load it in the browser.
RadEditor is more similar to a desktop HTML editor rather than to an integrated program like MS Word, FrontPage or Visual Studio for web.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
RadEditor is a client-side browser tool, providing the ability to visually edit pure HTML text using the underlying Rich Text Editing engine of the browser. This browser engine supports only standard HTML/XHTML tags and plain text.
Please, note that if you put a server tag in RadEditor the editor will not strip the tag, but will not render it in Design mode.
The ASP tags are not HTML tags and the browser is not able to visualize them. The browser cannot visualize XML Tags and when you put <asp:button> in the editor, the server-side framework will not parse the content (as it is part of the editor, not part of the page).
So, instead of sending to the client the HTML tag <input type=button> it will send <asp:button> - which means nothing to the browser.
To understand the situation better, please create a new HTML page with extension .html and add your server tags conent you put to the browser and load it in the browser.
RadEditor is more similar to a desktop HTML editor rather than to an integrated program like MS Word, FrontPage or Visual Studio for web.
Kind regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Timothy Robbins
Top achievements
Rank 1
answered on 12 Feb 2008, 05:37 PM
....And having realized you dont offer xhtml or html syntax highlighting as well, i withdraw my question. My apologies
No, i get the purpose. But in a CMS with dynamically loaded controls, for instance, it would be nice to be able to edit our markup with your tool.
You are correct, it doesnt know how to markup .net server controls. I wouldnt want it in WYSIWYG mode, that would be too much to ask.
I was just curious if there was some way for the editor to be able to recognize the standard xml node formatting and highlight accordingly (xhtml, and asp.net (theoretically) are xml-correct markup.
After all, it would also be neat to be able to edit straight XML with your editor.
I also totally recognize that WYSIWYG mode would be totally out of the question for either editing solution.
No, i get the purpose. But in a CMS with dynamically loaded controls, for instance, it would be nice to be able to edit our markup with your tool.
You are correct, it doesnt know how to markup .net server controls. I wouldnt want it in WYSIWYG mode, that would be too much to ask.
I was just curious if there was some way for the editor to be able to recognize the standard xml node formatting and highlight accordingly (xhtml, and asp.net (theoretically) are xml-correct markup.
After all, it would also be neat to be able to edit straight XML with your editor.
I also totally recognize that WYSIWYG mode would be totally out of the question for either editing solution.
0
Hi Timothy,
To achieve your scenario you can write your own custom tag that has a namespace. Internet Explorer and Firefox recognize such custom tags and you can easily style them. Here is an example:
<my:Button ID="Button1" style="border: 1px solid red;width: 50px; height: 20px;color: blue" runat="server" Text="Button" >button</my:Button>
Please, note that in order to be recognized by the browser the custom tag should have a namespace: <namespace:TagName></namespace:TagName>
You can find more information in the following MSDN article: Using Custom Tags in Internet Explorer.
Sincerely yours,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
To achieve your scenario you can write your own custom tag that has a namespace. Internet Explorer and Firefox recognize such custom tags and you can easily style them. Here is an example:
<my:Button ID="Button1" style="border: 1px solid red;width: 50px; height: 20px;color: blue" runat="server" Text="Button" >button</my:Button>
Please, note that in order to be recognized by the browser the custom tag should have a namespace: <namespace:TagName></namespace:TagName>
You can find more information in the following MSDN article: Using Custom Tags in Internet Explorer.
Sincerely yours,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
PowerSerge
Top achievements
Rank 1
answered on 20 May 2008, 11:08 PM
do we need to define the namespace for asp.net code like:
<HTML XMLNS:asp >
and then
<asp:TextBox id="txtName" runat="server" />
or do we need complete end tage
<asp:TextBox id="txtName" runat="server"></asp:TextBox>
I am experiencing asp.net markup that is modified by the rad editor. For example a <asp:button ... /> turns into <asp:button ...> <button> ... </button> </asp:button>
is there a correct solution for placing asp.net / custom xml within the rad.editor?
thanks,
mike
<HTML XMLNS:asp >
and then
<asp:TextBox id="txtName" runat="server" />
or do we need complete end tage
<asp:TextBox id="txtName" runat="server"></asp:TextBox>
I am experiencing asp.net markup that is modified by the rad editor. For example a <asp:button ... /> turns into <asp:button ...> <button> ... </button> </asp:button>
is there a correct solution for placing asp.net / custom xml within the rad.editor?
thanks,
mike
0
Hi Michael,
Actually, it is Internet Explorer that converts the
<asp:Button ID="Button1" runat="server" Text="Button" />
server control tag to
<asp:Button id="Button1" Text="Button" runat="server"></asp:Button>
For your convenience I have attached a sample HTML file with an editable IFRAME element in it which will help you to see that this is a browser behavior.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Actually, it is Internet Explorer that converts the
<asp:Button ID="Button1" runat="server" Text="Button" />
server control tag to
<asp:Button id="Button1" Text="Button" runat="server"></asp:Button>
For your convenience I have attached a sample HTML file with an editable IFRAME element in it which will help you to see that this is a browser behavior.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
