Code that runs in the editor?

Hi @bjorn.syse,

There isn’t an official editor API to use, but you can relatively easily execute code in editor using the browser console.

Here are some helpful posts to get you started:

So for example to change a property in an element component you can do this:

  1. Select the entity in editor
  2. Open the browser console
  3. Run this code to update the Text property:
editor.call('entities:selectedFirst').set('components.element.text', 'New text!')
2 Likes