Editor HTML looks different outside the editor

2 posts, 0 answers
  1. Coty
    Coty avatar
    41 posts
    Member since:
    Jun 2014

    Posted 24 Nov 2015 Link to this post

    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

  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    353 posts

    Posted 26 Nov 2015 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top