Preview Content is centered

6 posts, 0 answers
  1. John Snyder
    John Snyder avatar
    43 posts
    Member since:
    Mar 2006

    Posted 10 Jan 2008 Link to this post

    I have an editor in my page and the contents of the editor (in edit mode and preview mode) are centered by default.  I don't want this.  The editor is in a table and nothing else in the cell is centered.  I have attempted to put various tags around the editor to get everything left aligned but nothing seems to work.

    I managed to get the edit mode left aligned by creating a ContentAreaCssFile and specifying the text alignment.  However, the preview is still aligned centered instead of left aligned. 

    Any workarounds for this?
  2. George
    Admin
    George avatar
    859 posts

    Posted 11 Jan 2008 Link to this post

    Hi Dustin,

    I tried to reproduce the issue on my side but to not avail. Could you open a support ticket and send us a sample project reproducing the behavior?

    Once we have the project on our side we will do all our best to provide you with a solution as soon as possible.



    Kind regards,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nuri
    Nuri avatar
    40 posts
    Member since:
    Dec 2006

    Posted 16 Jan 2008 Link to this post

    I have exactly the same issue with Prometheus Editor version 2007.3.1216.35. Has it been resolved?
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 16 Jan 2008 Link to this post

    Hi Nuri,

    Is it possible to open a support ticket and send a sample working project that demonstrates the alignment problem? Please, include a screenshot of the observed behavior too. We are still unable to reproduce this problem and we will need your assistance.

    Once we are able to reproduce the problem on our side, we will do our best to provide a working solution.


    Looking forward to hearing from you soon,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Nuri
    Nuri avatar
    40 posts
    Member since:
    Dec 2006

    Posted 16 Jan 2008 Link to this post

    I was just creating a project for you and I found the cause (at least in my case). If you use a theme and have the following in your CSS file the editor centers the content: body { text-align: center }

    This is how to reproduce the problem:

    • create a new project
    • add a web.config and set the styleSheetTheme attribute:

    <pages styleSheetTheme="Blue" enableEventValidation="false">

      • add an  App_Themes folder and then create a new theme folder called Blue
      • Inside The "Blue" folder , create styles.css
      • Add  the following CSS rule inside styles.css

         body { text-align: center }

      • create a new master page with a single content area and nothing else
      • create a new default.aspx page that uses the master page
      • add this editor inside the asp:content control in your default.aspx:

      <telerik:RadEditor ID="Editor1" runat="server" Skin="WebBlue" SkinID="DefaultSetOfTools" Width="802px" Height="540px">

      <Content>

      <h3>Support</h3>

      <p>If you have questions about operating your product, please check our <a href=http://backstage...>Knowledge Base</a> for answers to the most common questions.</p>

      <strong>Support Documents</strong><br />

      </Content>

      </telerik:RadEditor>

      That's it. Run default.aspx page and you should see the centering.

      The editor works fine if you remove the CSS rule:   body { text-align: center }

      Cheers,
      Nuri






       

       

    • Rumen
      Admin
      Rumen avatar
      12851 posts

      Posted 17 Jan 2008 Link to this post

      Hi Nuri,

      You can easily fix the problem by setting the CssFiles property to point to your external css file. Thus the editor will not copy the page styles and will read only the styles from the external css file, e.g.

      <telerik:radeditor runat="server" ID="RadEditor1">
         
      <CssFiles>
             
      <telerik:EditorCssFile Value="~/ExternalCssFiles/Styles1.css" />
         
      </CssFiles>
      </
      telerik:radeditor>

      C#
      RadEditor1.CssFiles.Add("~/ExternalCssFiles/Styles1.css");


      VB.NET
      RadEditor1.CssFiles.Add("~/ExternalCssFiles/Styles1.css")

      In the Styles1.css file put your own css class that does not contain body { text-align: center } or keep the file empty. This should do the trick.

      Best regards,
      Rumen
      the Telerik team

      Instantly find answers to your questions at the new Telerik Support Center
    Back to Top
    UI for ASP.NET Ajax is Ready for VS 2017