Skip to content

shopsmart/ui-extensions-sdk

 
 

Repository files navigation

Contentstack Extensions SDK

The Extensions SDK allows you to extend Contentstack’s UI by helping you create Custom Fields, Custom Widgets, and Dashboard Widgets.

Custom Fields enable users to introduce simpler interface controls, such as color picker, code editor, video selector, and more, or maybe complex micro web applications such as Shopify or Snipkart. Because of their dissociated nature, custom fields can be reused multiple times.

Custom Widgets are like micro content-processing apps that help you analyze the entry content and provide recommendations. Some of the useful widgets you can create using this type of extension are text intelligence, SEO recommendations, language translation, grammar checker and more.

Dashboard Widgets let you add powerful widgets to the stack’s dashboard that let users do more from a centralized location. Some examples of this type of extension include personal notes, recently published content, notification centre, and stack usage summary.

This SDK overview document introduces you to the concept of custom extensions.

Getting started

Include the compiled version of the extension client library by adding the following line to your application.

<script src="https://unpkg.com/@contentstack/[email protected]/dist/ui-extension-sdk.js"></script>

Extensions examples

Custom Fields

Some of the examples of custom field extensions are:

  • Color Picker - Displays a native color picker polyfill that allows users to select color as input value and saves the color code in the backend

  • Ace Editor - Displays a code editor written in JavaScript, allowing you to edit HTML, PHP, JavaScript and more easily

  • JSON Editor - Displays a simple editor that lets you view, edit and format JSON code within the field of your content type

  • Key-value Field - Lets you add key-value as input value of a field of your content type

  • Progress Bar - Allows users to set value of a field by sliding the progress bar to the left or right

  • Star Ratings - Lets you provide rating by choosing number of stars

  • Brightcove - Lets you fetch and display your Brightcove videos into a field of your content type.

  • Shopify - Lets you load products of your Shopify store into the field of your content type.

  • Egnyte - Allows you to fetch files of your Egnyte account and display them into a field of your content type.

  • Ooyala - Lets you fetch and display your Ooyala videos into a field of your content type.

  • Optimizely - Lets you serve personalized content by allowing you to select the audience for each entry.

  • Youtube - Lets you fetch and display your Youtube videos into a field of your content type.

  • External API Lookup - Lets you fetch data from an external API and display the data as possible values for the field on an entry page in Contentstack.

Custom Widgets

Some of the examples of custom widget extensions are:

  • Text Intelligence - Lets you use MonekyLearn APIs to provide helpful recommendations such as content summarizer, keyword extractor, retail classifier, etc.

  • Google Analytics - Displays the traffic analysis and statistics of your entry (using Google Analytics data) on the sidebar of the entry.

  • Optimizely Experiments - Lets you retrieve and display Optimizely Experiments and their details in your entry.

Dashboard Widgets

Some of the examples of the dashboard widget extensions are:

  • Google Analytics - Displays the traffic analysis and statistics of your site on the stack dashboard.

Using Contentstack styles

Extensions are rendered within an iframe, you will need to include the ui-extension-sdk.min.css library within your custom extension in order to use any of the styles provided by Contentstack.

Include the CSS file in your extension code as follows:

<link rel="stylesheet" type="text/css" href="https://unpkg.com/@contentstack/[email protected]/dist/ui-extension-sdk.css">

For more information on styling your extension, refer to our style guide.

More information

The MIT License (MIT)

Copyright © 2019 Contentstack. All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 84.3%
  • JavaScript 14.2%
  • CSS 1.5%