skybow SharePoint Apps
Including External Configuration

 

The user can provide their own configuration for an app. In this case an app configuration file should be created. All configurations are displayed on the UI respectively. The file should be in JSON format with no extension.

 

Configuration components are the following:

   Title: to be displayed for the configuration in the Control Configuration area.

   ImageBase64: an image encoded to base64.

   RootElementSelector: CSS Selector of an element which defines whether the Configuration should be displayed in Designer on the current page.

   DemoPageHtmlOrJSUrl: the URL to the HTML or JS which will be inserted into the Demo Page for customizing.

   DemoPageAutoCustomizer: provides customization for an app on the Demo Page (it should be "null" if an html is set in DemoPageHtmlOrJSUrl).

   PublicAPIjQueryUniqueName: it should be "null" if an html is set in DemoPageHtmlOrJSUrl.

Demo Page JSUrl, DemoPageAutoCustomizer and PublicAPIjQueryUniqueName are used for internal users.

   Containers: nested elements.

   Editors: define what and which properties should be designed.

   Group: defines a tab where editor will be placed: Style, OrientationAndDimension, Font. See more informations here.

   Type: a type of Editor: 

   Appliers: CssSelector for an element that will be customized and CssParsePriority.

   EditorProperties: default values of the controls, e.g. DefaultFontSize.

 

Example of a simple configuration for styling background of web parts:

'CustomConfiguration'
Copy Code
{"Title":"custom Configuration",
"ImageBase64":"data:image/png;base64,iVBORw0KGgo...",
"RootElementSelector":".ms-webpart-zone",
"DemoPageHtmlOrJSUrl":"https://sb.com/SiteAssets/CustomConfiguration.html",
"DemoPageAutoCustomizer":null,
"PublicAPIjQueryUniqueName":null,
"Containers":[{"Title":"WebPart","Editors":[{"Group":"StyleGroup","Type":"BackgroundEditor","Appliers":[{"CssSelector":".ms-webpart-zone","CssParsePriority":null}],"EditorProperties":""}]}]}

 

 

 

See Also