none
Style's unaviable on editor RRS feed

  • Question

  • Have an issue with a custom page layout, the styles are not loading if I click the down arrow I get an error and click on the styles I get unavailable.

    here is the code the layout.

    <%@ Page language="C#"   Inherits="Microsoft.SharePoint.Publishing.PublishingLayoutPage,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" %><%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
    	<SharePointWebControls:cssregistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/page-layouts-21.css %>" runat="server"/>
        <PublishingWebControls:editmodepanel runat="server">
            <!-- Styles for edit mode only-->
            <SharePointWebControls:cssregistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/edit-mode-21.css %>" After="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/page-layouts-21.css %>" runat="server"/>
        </PublishingWebControls:EditModePanel>
    	<SharePointWebControls:cssregistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/rca.css %>" runat="server"/>
        <SharePointWebControls:cssregistration name="Intranet/css/styles-richtext.css" runat="server"/>
    	<SharePointWebControls:fieldvalue id="PageStylesField" FieldName="HeaderStyleDefinitions" runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
    	<SharePointWebControls:fieldvalue FieldName="igBrowserWindowTitle" runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceholderID="PlaceHolderPageTitleInTitleArea" runat="server">
    	<SharePointWebControls:fieldvalue FieldName="Title" runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderTitleBreadcrumb" runat="server"> 
    	<SharePointWebControls:listsitemappath runat="server" SiteMapProviders="CurrentNavigation" RenderCurrentNodeAsLink="false" PathSeparator="" CssClass="s4-breadcrumb" NodeStyle-CssClass="s4-breadcrumbNode" CurrentNodeStyle-CssClass="s4-breadcrumbCurrentNode" RootNodeStyle-CssClass="s4-breadcrumbRootNode" NodeImageOffsetX=0 NodeImageOffsetY=353 NodeImageWidth=16 NodeImageHeight=16 NodeImageUrl="/_layouts/images/fgimg.png" HideInteriorRootNodes="true" SkipLinkText=""/>
    </asp:Content>
    
    <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
    	<div class="ei-article">   
            <div class="ei-1-column">
                <div class="ei-article-header-date">
                    <h1>&nbsp;
                    
                    <SharePointWebControls:textfield runat="server" FieldName="Title"></SharePointWebControls:textfield>
                    
                    </h1>
                    <div class="ei-article-date">
                        <SharePointWebControls:datetimefield ID="ArticleStartDateValue" FieldName="ArticleStartDate" runat="server"/>
                    </div>
                </div>
                <div class="captioned-image">
    			    <div class="image">
    				    <PublishingWebControls:richimagefield FieldName="PublishingPageImage" AllowHyperlinks="false" runat="server"/>
    			    </div>
    			    <div class="caption">
    				    <PublishingWebControls:richhtmlfield FieldName="PublishingImageCaption"  AllowTextMarkup="false" AllowTables="false" AllowLists="false" AllowHeadings="false" AllowStyles="false" AllowFontColorsMenu="false" AllowParagraphFormatting="false" AllowFonts="false" AllowInsert="false" PreviewValueSize="Small" runat="server"/>
    			    </div>
    		    </div>
                <PublishingWebControls:richhtmlfield FieldName="PublishingPageContent" HasInitialFocus="True" MinimumEditHeight="400px" PrefixStyleSheet="ei-" AllowFontsMenu="false" runat="server"/>
     <div>
          <WebPartPages:webpartzone runat="server" AllowPersonalization="false" FrameType="TitleBarOnly" title="Bottom Webpart Zone" id="bottomZone" orientation="Vertical"  QuickAdd-ShowListsAndLibraries="false"><ZoneTemplate></ZoneTemplate></WebPartPages:webpartzone>
      </div>
            </div>
            <PublishingWebControls:editmodepanel runat="server" CssClass="edit-mode-panel ei-meta-panel roll-up">
                <SharePointWebControls:BooleanField ID="showOnFeedValue" FieldName="showOnFeed" runat="server" />
    			<SharePointWebControls:NoteField ID="ArticleTeaser" FieldName="Comments" InputFieldLabel="Article Teaser" runat="server" />
    			<SharePointWebControls:DropDownChoiceField ID="ArticleType" FieldName="AnnouncementType" runat="server" />
    			<PublishingWebControls:RichImageField FieldName="PublishingRollupImage" AllowHyperLinks="false" runat="server" />
                <asp:Label Text="<%$Resources:cms,Article_rollup_image_text%>" runat="server" />
            </PublishingWebControls:EditModePanel>
        </div>
    </asp:Content>


    • Edited by VindaRosa Monday, April 24, 2017 11:00 AM
    Monday, April 24, 2017 10:59 AM

Answers

All replies

  • Hi,

    I tested your code and seems working fine.

    The ‘Intranet/css/styles-richtext.css’ seems your custom CSS, could you comment this and check?

    Could you provide screenshots if still issue, so it would help others understand your issue more clearly.

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, April 27, 2017 5:50 AM
  • Hi Lee, commented out the custom style sheet and the styles are still cycling and not loading? as stated previously if I click the down arrow on the styles and then click the individual styles they change to not available

    any ideas??

    Thursday, April 27, 2017 7:54 PM
  • Hi,

    Got your issue now, the issue should be the PrefixStyleSheet="ei-", I remove the this property and the Style could render now.

    If you want to use default style, try with below code:

    <PublishingWebControls:RichHtmlField FieldName="PublishingPageContent" HasInitialFocus="True" MinimumEditHeight="400px" runat="server"/>

    If you want to custom style for RichHTMLField, here are some threads for your reference.

    http://www.brandmysharepoint.de/sharepoint-2013-rich-text-editor-anpassen/#.WQK2E4iGOM8

    http://www.broculos.net/2013/06/guide-to-sharepoint-2010s-rich-text.html#.WQK2CYiGOM8

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, April 28, 2017 3:30 AM