From 4ad759dd2545469565b6aa1b6fbf3841780778f2 Mon Sep 17 00:00:00 2001 From: Mikk Andresen Date: Fri, 18 Dec 2015 13:33:49 +0200 Subject: [PATCH] Add postToolbarInit documentation and usage examples --- doc/api/hooks_client-side.md | 14 +++++++++++++- doc/api/hooks_server-side.md | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/api/hooks_client-side.md b/doc/api/hooks_client-side.md index 1c9ca5af1..b22db5dad 100644 --- a/doc/api/hooks_client-side.md +++ b/doc/api/hooks_client-side.md @@ -160,7 +160,19 @@ Things in context: 1. ace - the ace object that is applied to this editor. 2. pad - the pad object of the current pad. -There doesn't appear to be any example available of this particular hook being used, but it gets fired after the editor is all set up. +## postToolbarInit +Called from: src/static/js/pad_editbar.js + +Things in context: + +1. ace - the ace object that is applied to this editor. +2. toolbar - Editbar instance. See below for the Editbar documentation. + +Can be used to register custom actions to the toolbar. + +Usage examples: + +* [https://github.com/tiblu/ep_authorship_toggle]() ## postTimesliderInit Called from: src/static/js/timeslider.js diff --git a/doc/api/hooks_server-side.md b/doc/api/hooks_server-side.md index d9ec0db5f..5775c49d9 100644 --- a/doc/api/hooks_server-side.md +++ b/doc/api/hooks_server-side.md @@ -104,6 +104,10 @@ Things in context: Here you can add custom toolbar items that will be available in the toolbar config in `settings.json`. For more about the toolbar controller see the API section. +Usage examples: + +* [https://github.com/tiblu/ep_authorship_toggle]() + ## padCreate Called from: src/node/db/Pad.js