ZADA PluginLoader

This page documents ZADA's runtime plugin architecture and shows it live on ace-snippets Plugin (inline ace in body text + optional tabs/manifest).

Principle: pluginLoader.js reads #ZADA_PLUGINS , loads plugin scripts (src), and calls for them plugin.init(ctx, options) auf. Ohne #ZADA_PLUGINS the loader is a no-op.

1) Core: pluginLoader.js

Main idea: Registry + deterministic loading/init from a JSON script tag.

/js/core/pluginLoader.js

2) Plugin: ace-snippets

The plugin can:

  • Inline Initialize ACE blocks (DOM markup: .zada-ace[data-src] ) – no Manifesto needed
  • Tabs + Editor via manifest ( manifestUrl ) – classic snippet list

/js/plugins/ace-snippets/aceSnippetsPlugin.js

3) Page configuration: #ZADA_PLUGINS

For the loader to work, the page must contain a plugin configuration. Example:

/plugins/ace/snippets/zada-framework/pluginInitSectionExampe.json

A notice: The loader loads everyone first src scripts in order and then initializes plugins in the same order.

4) Live-Demo: Inline ACE im Text (ohne Manifest)

These two blocks are pure HTML placeholders. The plugin finds them via embeddedSelector and renders it as a read-only ACE.

Example snippet asset: pageController.js
Example snippet asset: updatePageMeta.js

5) Live-Demo: Tabs + Manifest

This area uses a manifest as a snippet list: /plugins/ace/snippets/zada-framework/manifest.json .

Manifest