Commit Graph
9 Commits
Author SHA1 Message Date
Maciej Smolinski e25926619e Events: Allow for easier application extension with hook points.
How does it work?

Every time someone wants to extend the application, instead of modifying original `publishing.js` file, he or she can subscribe to given events, e.g.

Scenario: Table Of Contents extension

```
// resources/public/js/toc.js

events.subscribe('content:rendered', function () {
  // Prepend table of contents in edit mode on updates
});

events.subscribe('document:loaded', function () {
  // Prepend table of contents on initial load in edit view and preview
});
```

Now, having structured way to hook into app allows to keep the main codebase maintainable and pretty stable and extremely extensible at the same time.
2016-07-19 19:03:20 +02:00
Christian Müller 8ee00da09a black listing improved 2016-07-02 17:24:23 +02:00
Christian Müller a426570b2f minor template update 2016-03-21 12:33:47 +01:00
Christian Müller 60bd77171a misuse prevention mechanism added 2016-03-21 12:22:54 +01:00
Christian Müller a8d29c6775 refactoring for status messages 2015-10-18 09:54:12 +02:00
Christian Müller b05f103a37 /new page implemented 2015-10-06 22:06:36 +02:00
Christian Müller 90fe8cce61 template extended with footer 2015-09-25 23:09:25 +02:00
Christian Müller 36c166d10b markdown enabled 2015-09-25 22:57:44 +02:00
Christian Müller b2b383b941 page builder module started 2015-08-17 09:23:28 +02:00