How to use the contentful-ui-extensions-sdk.locations.LOCATION_ENTRY_FIELD function in contentful-ui-extensions-sdk

To help you get started, we’ve selected a few contentful-ui-extensions-sdk 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 contentful / ui-extensions-sdk / test / extensions / test-extension / src / index.js View on Github external
init(sdk => {
  window.sdk = sdk
  if (sdk.location.is(locations.LOCATION_ENTRY_FIELD)) {
    renderExtension()
  } else if (sdk.location.is(locations.LOCATION_PAGE)) {
    renderExtension()
  } else if (sdk.location.is(locations.LOCATION_ENTRY_SIDEBAR)) {
    renderExtension()
  } else if (sdk.location.is(locations.LOCATION_ENTRY_EDITOR)) {
    renderExtension()
  } else if (sdk.location.is(locations.LOCATION_DIALOG)) {
    renderExtension()
  }
})
github contentful / extensions / lib / shared-dam-app / src / index.tsx View on Github external
init(sdk => {
    const root = document.getElementById('root');

    if (sdk.location.is(locations.LOCATION_DIALOG)) {
      integration.renderDialog(sdk as DialogExtensionSDK);
    }

    if (sdk.location.is(locations.LOCATION_ENTRY_FIELD)) {
      render(
        ,
        root
      );
    }

    if (sdk.location.is(locations.LOCATION_APP)) {
      render(
github contentful / extensions / marketplace / commercetools-products / src / index.js View on Github external
init(extension => {
  const installationParameters = extension.parameters.installation;
  extension.window.startAutoResizer();

  if (extension.location.is(locations.LOCATION_ENTRY_FIELD)) {
    ReactDOM.render(
      ,
      document.getElementById('root')
    );
  } else if (extension.location.is(locations.LOCATION_DIALOG)) {
    ReactDOM.render(
      ,
      document.getElementById('root')