How to use the netlify-cms.getEditorComponents function in netlify-cms

To help you get started, we’ve selected a few netlify-cms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uploadcare / uploadcare-netlifycms / src / index.js View on Github external
function registerPlugin(options) {
  Widget.register()

  /* eslint-disable*/
  // hack to remove default image widget
  const comps = CMS.getEditorComponents()
  comps._root.entries = []
  comps.size = 0
  /* eslint-enable*/

  CMS.registerEditorComponent(createSingle(options))
  CMS.registerEditorComponent(createMultiple(options))
}