New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@elateral/brandgility-embedded-api

Package Overview
Dependencies
Maintainers
26
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elateral/brandgility-embedded-api

Brandgility embedded mode library

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
26
Created
Source

How to embed Brandgility's configurator into an iframe:

  • get the id of template to be configured from Brandgility application
  • To open an asset for customization, copy and paste below code into your page/component, replace :id in src attribute with your template's id:
<iframe src="<BRANDGILITY_ENDPOINT>/embedded-template-configure/{new|edit}/:id?action=DRAFT_TEMPLATE_CONFIGURATION_START&eid=:id&embedded=true" />
  • To configure an already saved template customization, copy and paste below code into your page/component, replace :id in src attribute with your saved template customization id:
<iframe src="<BRANDGILITY_ENDPOINT>/embedded-template-configure/{new|edit}/:id?action=DRAFT_TEMPLATE_CONFIGURATION_EDIT&eid=:id&embedded=true" />

API library

Brandgility embedded api library allows you to issue commands to Brandgility configurator in embedded mode

Methods

methoddescriptionparameters
onsubscribes to eventeventName: <string>, argument: <function>
emittriggers an eventeventName: <string>, argument: <serializable, see The structured clone algorithm>

Events to listen

To subscribe on event use on method:

brandgilityEmbeddedApi.on('load', () => console.info('loaded'));
eventdescriptionarguments
loadload evententity { type: <string> , id: <string> }
savesuccess save eventid of saved item <string>
errorerror eventerror { message: <string> }

Events to trigger

To trigger an event use emit method:

brandgilityEmbeddedApi.emit('save');
eventdescriptionparameters
savesaves a current version of template-
saveAscreates a new saved customization from an existing saved customizationnew item { name: <string>, comments: <string> }

FAQs

Package last updated on 10 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc