Loading...

How Merlin knows what to do

Every Merlin command is one defineOption call; this is its shape and who defines them.

Merlin

  1. Every command is an option with these fields. (title, icon, tags, value, eventName, path, context, priority, inline, shortcut, i18n, more)
  2. Context decides when an option shows. (context, CMS, HAX, *, admin, >, /, logged-in, community, system-settings, addPage, uploadMedia)
  3. eventName decides what happens: call a method, run a program, click, insert. (eventName, super-daemon-element-method, super-daemon-run-program, insert-tag, super-daemon-element-click)
  4. HAXcms, the dashboard and the editor define the commands; Tips show up here too. (haxcms-elements, app-hax, hax-body, HAX Tips)