Extending Page Editor
The Page editor API remains under development. Detailed specifications will be provided in the future.
The key of Web Fragments loaded by Page editor to get extensions is
The expected default export should provide an object with the
init function with a single argument, which will be the Page editor object.
To register the fragment, provide the OSGi components that implement the
pl.ds.websight.fragments.registry.WebFragment interface to
There is a required Maven dependency (see the version of the
websight-fragments-registry bundle used in your system in
Apache Felix Web Console in your local instance:
getFragment method should be a bundle resource provided by your
application and must be available in the CMS authoring runtime (specifically, it must be accessible for content author browser requests).
Using Page editor extensions
Below you can find examples of Page editor extensions usage.
Page editor uses an API for working with events. You can register a handler for events used in Page editor.
To register an event listener use
editor.addEventListener and pass the event type and listener function
(you can use the event data object parameter if needed).
|Event type||Description||Event data|
|component-dom-updated||This event is thrown after component's dom is updated.||`target` - component|
Example extension registering the event listener: