rad editor preview of edit doesn't match published sharepoint page.

8 posts, 0 answers
  1. Mark Greve
    Mark Greve avatar
    11 posts
    Member since:
    Aug 2008

    Posted 23 Oct 2008 Link to this post

    I have set the rad editor to be 100% and am using it for a content type which is Publishing HTML. When I enter text in the radeditor control neither the edit mode or the preview mode match the published page view. The lines wrap at totally different words.

    RadEditor 5.2.2

    html and css as follows in a Moss page layout.

     <div id="rightContentDiv" class="rightContenDiv">
          <div class="pageContent" >
               <telerik:RadHtmlField DisplayHeight="200px" 
                DisplayWidth="100%" FieldName="PageContent2" 
                runat="server" id="RichHtmlField1" >
               </telerik:RadHtmlField>
          </div>
     </div>

     
    .rightContenDiv
    {
     float:right;
     width:259px;
    }

    .pageContent
    {
          font-family:tahoma; 
          font-size:10pt; 
          color:#5B5B5B; 
    }

    Thanks
    Mark

  2. George
    Admin
    George avatar
    859 posts

    Posted 24 Oct 2008 Link to this post

    Hi Mark Greve,

    Could you please set inline into the editor's declaration Width="100%" Height="200px", instead of DisplayWidth and DisplayHeight  and see what the result will be? In addition, note that when using the editor in WCM scenario the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/ 4.x.x.0__1f131a624888eeed/RadControls/Editor/ConfigFile.xml will be applied to the editor, unless you don't specify your custom ConfigFile e.g. ConfigFile="/_layouts/CustomConfigs/CustomConfig.xml"

    I hope this helps.

    Have a great weekend,
    George
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  3. Mark Greve
    Mark Greve avatar
    11 posts
    Member since:
    Aug 2008

    Posted 24 Oct 2008 Link to this post

    I changed the editor as follows.

       <telerik:RadHtmlField FieldName="PageContent2" runat="server" id="RichHtmlField1" CssClass="rightContentEditor" >
       </telerik:RadHtmlField>

    .rightContentEditor
    {
     Height:200px;
     Width:100%;
    }

    The editor still doesn't view the text corectly in either edit or preview mode. The editor now runs off the edge of my page and is not fully viewable and there is no way to grab the resize corner as it is off the screen.

    My config.xml file has not been changed and is as follows. the cofig.xml file in the C:\Program Files\Common Files\microsoft shared\Web Server Extensions\wpresources\RadEditorSharePoint\5.2.0.0__1f131a624888eeed\Resources folder contains the following.

    <configuration>
      <property name="AllowThumbGeneration">True</property>
      <property name="ConvertToXhtml">True</property>
      <property name="EnableDocking">False</property>
      <property name="ShowHtmlMode">True</property>
      <property name="ShowPreviewMode">False</property>
      <property name="ToolbarMode">ShowOnFocus</property>
      <property name="ToolsWidth">800px</property>
      <property name="Skin">Telerik</property>
    </configuration>

    I also tried changing the ShowPreviewMode to True ans saw no difference.

    Thanks
    Mark

  4. Mark Greve
    Mark Greve avatar
    11 posts
    Member since:
    Aug 2008

    Posted 24 Oct 2008 Link to this post

    Are you saying I need to put a code block in every page layout that I want to have a valid preview? 

    Like

    <script runat="server">

    protected void Page_Load(object sender, EventArgs e)

    {
        RadHtmlFIdld3.Width="100%";

    }

    </script>


    and list each page in the web.config ??


    <PageParserPaths>

    <PageParserPath VirtualPath="TwoCol.aspx" CompilationMode="Always" AllowServerSideScript="true" />

    </PageParserPaths>

  5. Mark Greve
    Mark Greve avatar
    11 posts
    Member since:
    Aug 2008

    Posted 24 Oct 2008 Link to this post

    Tried this in a code block and get the following error Telerik.Sharepoint.FieldEditor.RadHTMLField does not contain a definition for Width.
    entered in the page_load as above

    RichHtmlField1.Width="100%";
  6. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 28 Oct 2008 Link to this post

    Hello,

    To set the size of the Telerik.Sharepoint.FieldEditor.RadHTMLField control programmatically (from code or from the control properties tab), you should use the DisplayHeight and DisplayWidth properties - just like the original RichHtmlField SharePoint control.

    If you are setting the size from the editor configuration file (ConfigFile.xml or ListConfigFile.xml), then you use the normal RadEditor properties Width and Height.


    Kind regards,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Mark Greve
    Mark Greve avatar
    11 posts
    Member since:
    Aug 2008

    Posted 30 Oct 2008 Link to this post

    Neither of these set the control to correctly. The published view does not match the edit or prview view.

    The word wraps are different for example this text will be entered in the editor window and when published will look like this.

    The word wraps are different for example this text will be
    entered in the editor window and when published will
    look like this.


    I originally used the displaywidth in the aspx page and  tried the width in the config file.

  8. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 06 Nov 2008 Link to this post

    Hello,

    Perhaps the difference is caused by a CSS style, which is applied in published view but not in the editor. The editor content area is a separate document and takes only a subset of the CSS styles of the default page (for more information, see http://www.telerik.com/help/aspnet-ajax/defining-custom-css-styles.html). Since the preview is also inside the editor content area, it also uses different CSS styles from the main page. I suggest that you open a support ticket and send us a few screenshots of the problem plus the HTML source of the page in published view, so we can see what you are trying to achieve and help you with specific information.

    Kind regards,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top