New answers tagged

0

The script is returning results from both publishing sites and other sites. But it only returns CEWP's which have script tags in it or CEWP's which has a contentlink that point to a textfile with scripts. If you want all CEWP's, you need to adapt the Get-CEWP function. Replace the following code: if ($webPart.ContentLink.Length -gt 0) { # Check file in ...


0

<script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(queryListItems, "sp.js") var itemId = 2; // Set your listitem id var counterListItem; function queryListItems(){ var clientContext = new SP.ClientContext(); var counterList = clientContext.get_web().get_lists().getByTitle('CounterList'); counterListItem = ...


3

All content editors are rendered as part of single HTML document. CSS styles don't have scope, they affect entire page. It's a common practice to use content editors to hide SharePoint UI elements (like ribbon buttons) that are not part of the web part. You can create single root elements per each CE and assign ID value: <div id="navigation-div"> ...


0

The CSOM LimitedWebPartManager only allows import of a web part, but not export. So no, you cannot access the Content property. There is an Office UserVoice suggestion to introduce this CSOM capability: https://officespdev.uservoice.com/forums/224641-general/suggestions/6413925-expose-microsoft-sharepoint-webpartpages-splimited As an alternative for now, ...



Top 50 recent answers are included