Skip to Content
Developer docs

The editor

Put the Meishi editor on your page, set it up and listen to its events.

Add it to your page

Works on plain HTML, WordPress, Shopify and Wix:

<script src="https://meishi.cards/creator/v1.js" defer></script>
<meishi-creator website-key="mk_live_xxx" height="720"></meishi-creator>

<script>
  document.querySelector('meishi-creator').addEventListener('meishi-complete', event => {
    console.log(event.detail.experienceId, event.detail.scanUrl);
  });
</script>

Options

Prop

Type

On the element, the same options are attributes: website-key, locale, content="video,model,info", print-width-mm, metadata (JSON), primary-color and height.

Events

EventWhenPayload
readyThe editor is loaded.
stepThe visitor moved to another step.{ step }
completeThe visitor sent the design.{ experienceId, scanUrl, status, printImageUrl }
processedThe hologram or model is finished.{ experienceId, status, scanUrl }
errorSomething went wrong.{ message, code? }

On the element they arrive as meishi-ready, meishi-step, meishi-complete, meishi-processed and meishi-error, with the payload in event.detail.

complete comes from the visitor's browser, so treat it as a hint, not as proof. Your server confirms and follows experiences with the server key.

Error codes

error.code says why, when the API did. A shop can hide its hologram option on any of these instead of showing the editor's message.

CodeMeaning
website_not_allowedThis page's address is not listed on the key.
key_inactiveThe key was deleted.
plan_requiredYour plan does not include the website integration.
no_experience_creditsYour organization has no experiences left.
session_expiredThe editor was open too long. Open it again.
session_quotaToo many editor sessions were started. Try again later.