Как включить HTML-разметку по умолчанию на веб-панели редактора контента

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/91612

Вопрос

У меня есть макет страницы с одним Richhtmlfield, эта макет страницы, который я использую для моего блога здесь:

http: http://levalencia-public.sharePoint.com/pages/2014/02/welcome-to-my-sharepoint-online-blog-aspx.aspx

Однако каждый раз, когда я создаю страницу, я хочу включить дизайн левого ящика, который всегда одинаково.

Пожалуйста, обратите внимание, что я использую макет страницы с HTML, а не ASPX (через Design Manager), а сгенерированные фрагментами, как очень ясно, не модифицируют контент внутри.

<!--CS: Start Page Field: Page Content Snippet-->
            <!--SPM:<%@Register Tagprefix="PageFieldRichHtmlField" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
            <!--MS:<PageFieldRichHtmlField:RichHtmlField FieldName="f55c4d88-1f2e-4ad9-aaa8-819af4ee7ee8" runat="server">-->
                <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><div id="ctl02_label" style="display:none">Page Content</div><div id="ctl02__ControlWrapper_RichHtmlField" class="ms-rtestate-field" style="display:inline" aria-labelledby="ctl02_label"><div align="left" class="ms-formfieldcontainer"><div class="ms-formfieldlabelcontainer" nowrap="nowrap"><span class="ms-formfieldlabel" nowrap="nowrap">Page Content</span></div><div class="ms-formfieldvaluecontainer"><div class="ms-rtestate-field">Page Content field value. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div></div></div></div><!--PE: End of READ-ONLY PREVIEW-->
            <!--ME:</PageFieldRichHtmlField:RichHtmlField>-->
            <!--CE: End Page Field: Page Content Snippet-->
.

Это было полезно?

Решение

If I where you, I would try to ignore that warning and replace

<div class="ms-rtestate-field">Page Content field value. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>

with

<div class="ms-rtestate-field">Whatever you want to add to your Content editor webpart :)</div>

I see no reason why this should fail, the worst thing that can happen is that the logic for creating the page layout .aspx from the .html just ignores that you have changed tha value, the best thing that can happen is that it actually works ;)

Другие советы

If you want to use the Snippet gallery, you can put html in the html field. The field is under "Misc" in the Customization section.

This field is a single line of text, so remove any line breaks from your html.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top