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

Editor HTML looks different outside the editor

1 Answer 92 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Coty
Top achievements
Rank 1
Coty asked on 24 Nov 2015, 04:20 PM

Hello,

How can I make the content inside the editor look the same when it's outside the editor?  For example, the user formats their information using the editor, we save the HTML to a database, then it is used to view on another webpage but the formatting is not completely the same.  I formatted some of the styles manually but there has to be an easier way because that is the point of an the editor?  It seems extra styles and classes are added to the editor that are not applied to the actual HTML.

Thanks,

Coty

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 26 Nov 2015, 04:11 PM
Hi Coty,

The Kendo UI Editor has two modes - Classic and Inline. The classic mode uses an Iframe to type in, while in inline mode the Editor's <div> is made contenteditable, so the existing page styling can influence the editable content:

http://docs.telerik.com/KENDO-UI/web/editor/overview#modes

If in classic mode, the widget applies some default CSS styles to its iframe content. You can find additional information on how to remove or override these styles here:

http://docs.telerik.com/KENDO-UI/web/editor/overview#default-content-styling

If in inline mode, the Editor content's appearance depends entirely on the CSS styles, which are currently used on the page. From this point of view, you may need to add or change something in order to make the content's appearance identical on both pages.

I hope this helps. Can you explain in more detail what do you mean by the last sentence?

"It seems extra styles and classes are added to the editor that are not applied to the actual HTML."

Regards,
Dimiter Topalov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Coty
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or