This is a migrated thread and some comments may be shown as answers.

doctype, html and head in source code view

3 Answers 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ayaz
Top achievements
Rank 1
Ayaz asked on 25 Jun 2010, 07:42 PM
Hi,

I'm initializing the editor via:
    <telerik:RadEditor ID="Editor" runat="server" StripFormattingOptions="Font, Span, Css, MSWordRemoveAll" OnClientPasteHtml="OnClientPasteHtml" Width="100%" OnClientModeChange="OnClientModeChange" OnClientCommandExecuting="OnClientCommandExecuting"/>

In source code view I see:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title></title>
    </head>
    <body>


<!-- content -->
    </body>
</html>

I would only like to see <!-- content --> in source code view.
I am not using templatemanager - mentioning that because I saw some discussion about this similar topic and it seemed to be related to templatemanager.

Thanks.







3 Answers, 1 is accepted

Sort by
0
Rumen Jekov
Top achievements
Rank 1
answered on 26 Jun 2010, 10:13 PM
Hi,

RadEditor has two HTML editing modes:
- full HTML page mode - in this mode the content loaded in RadEditor contains its html, head and body tags. For more information see this live demo: http://demos.telerik.com/aspnet-ajax/editor/examples/completehtmlsupport/defaultcs.aspx
- or standard mode - in this mode only the content inside the body tags is loaded. The html, head and body tags are not added to the content. All you need to do to is to set the comment tag as a value of the RadEditor1.Content property and the editor will be populated only with this tag in its content area, e.g.

RadEditor1.Content = "<!-- content -->";

Best regards,
Rumen
0
Ayaz
Top achievements
Rank 1
answered on 28 Jun 2010, 11:12 PM
Thank Rumen, but I am having trouble understanding how to set the mode to be standard all the time (instead of setting the content property).

Thanks,

Ayaz
0
Accepted
Rumen
Telerik team
answered on 01 Jul 2010, 12:40 PM
Hi Ayaz,

By default the editor works only with the content inside the <body> tag. It will be turned in Full HTML page editing mode only if the user pastes full HTML content in HTML mode or if the developer loads such content via the Content property. The editor will be switched in this mode also when the Page Properties dialog is used.

If you do not load Full HTML content through the Content property than you should not experience this problem. In this case it will be best to isolate the problem in a sample working project and send it for examination by opening a support ticket.

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Ayaz
Top achievements
Rank 1
Answers by
Rumen Jekov
Top achievements
Rank 1
Ayaz
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or