I believe that you are testing the Default Example under Firefox. Am I correct?
Please, note that RadEditor uses the rich text editing (RTE) engine of the browser under which it operates. The RTE engine of Internet Explorer does not display the encodes the < and > symbols in the <% my code %> string and the tag is not rendered in this browser.
However, the RTE engine of Firefox, encodes the < and > symbols and to their HTML entities < and > and the browser renders the server tag in Design mode. You can reproduce this behavior with the Mozilla's demo editor:
as well as with our competitor's editors in Firefox.
If you would like, you can use a content filter that will convert the < and > entities to < and > symbols when the content is submitted your users switch to Html mode in Firefox. Thus the server tags will be saved properly.
if(!document.all) //if Firefox
this.GetHtmlContent = function (content)
re = /</gi
re1 = />/gi
newContent = content.replace(re,"<").replace(re1,">");
/* Use the editor onload function to register the filter with the FiltersManager */
function OnClientLoad (editor)
var customFilter = new RadEditorCustomFilter();
<radE:RadEditor id="RadEditor1" OnClientLoad="OnClientLoad" Html="<% my code %>" Runat="server"></radE:RadEditor>
All the best,
the Telerik team