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

radeditor not generate its own html

3 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jassie
Top achievements
Rank 1
Jassie asked on 17 Dec 2018, 10:55 PM
When looking at the Telerik website forums called UI for ASP.NEXT Ajax I have the following questions:
1. it looks like you have an option to have html generated by an asp.net form can either edit your applications' html or not.To be able to have your html edited or not would you show me/tell me how to to set this up? **I would assume this is a web.config file setting
2. Does the radedior generate its own html? IF so, does the radeditor generate the html to fix html errors? If so how can you have the radeditor not generate its own html?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 Dec 2018, 05:15 PM
Hi Jassie,

RadEditor is a rich text HTML editor similar to MS Word. Its content area is an editable div/iframe and can work and operate with HTML, CSS and plain text only. Using its tools you can generate HTML content with formatting and save it in a DataBase or another storage. The control, however, is not a Visual Studio for Web and cannot be used to edit and configure ASP.NET forms or server controls inside its content area since the browser does not recognise such tags.

You can play with it in the following demos: 
https://demos.telerik.com/aspnet-ajax/editor
https://demos.telerik.com/aspnet-ajax/editor/examples/ms-word-like-experience/defaultcs.aspx

You can see how to edit HTML pages in these demos: 
https://demos.telerik.com/aspnet-ajax/editor/examples/completehtmlsupport/defaultcs.aspx
https://demos.telerik.com/aspnet-ajax/editor/examples/saveinexternalfile/defaultcs.aspx

You can see how to install it at
https://docs.telerik.com/devtools/aspnet-ajax/getting-started/first-steps
https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/getting-started/overview

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Jassie
Top achievements
Rank 1
answered on 18 Dec 2018, 10:42 PM
I am asking the additional questions assuming that I set the 'NewLineMode property of the control to Br' for the radeditor.
1. If I want to place font sizes in the html that I send to the radeditor, will the font sizes be used? If not, would I need to follow the
directions from the following link:
https://www.telerik.com/support/kb/aspnet-ajax/editor/details/set-default-font-for-the-content-area-and-font-name-dropdown ?
2. The following link looks like you have to use the information from the following link to edit the html:
https://demos.telerik.com/aspnet-ajax/editor/examples/completehtmlsupport/defaultcs.aspx.
 
   However when the radeditor opens, I already have that html setup. Thus if I use the radeditor, can I edit my html before the radeditor is opened? If so,
   how would I do the editing?
3. Is there a problem if I want to mix and match the <br/> tags with the <p></p> tags before the html to loaed to the radeditor? If so, what is the problem and what can i do to prevent any problems from occuring? Should I use all paragraphs tags only or should I use only a line break </br. tags only?
0
Rumen
Telerik team
answered on 19 Dec 2018, 03:01 PM
Hi Jassie,

Straight to the points:
  • If the font is applied via the Font Name and Font Size/Real Font Size tools or available as a markup/inline CSS style then it will be available in the exported content. If however the font is applied via a CSS class, then it won't be available in the exported markup. The following article explains this scenario and provides two solutions: No FONT tags are applied when I type text in the editor.
  • The https://demos.telerik.com/aspnet-ajax/editor/examples/completehtmlsupport/defaultcs.aspx demo shows how to edit full html page in the editor. Usually the editable iframes offer the ability to edit the contents inside the body tags of the page. RadEditor goes beyond this limitation and allows you to have html, head and body tags when obtaining the content via the RadEditor1.Content server property. The html, head, title, body tags are not visible in Design mode, but only in HTML mode of the control. You can find information for the Edit modes here

    What do you mean to edit the content before RadEditor is opened? The content loaded in RadEditor is a string, and you can edit it as you wish prior loading it in the control via the Content server property. Can you provide screenshots and what you'd like to achieve?
  • You can have <br> tags outside or inside the paragraph tags. I don't see a problem in mixing them.

Regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Jassie
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Jassie
Top achievements
Rank 1
Share this question
or