summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2014-03-05 21:44:22 +0000
committerJohn McLear <john@mclear.co.uk>2014-03-05 21:44:22 +0000
commitdf205a4ef47554aae97f24c1f08084f50ad5156e (patch)
treea544ae91b29ff249b2fa10a5de359cd438490b51 /doc
parent89d7ba0dc04f73d6d462188aa1cf3154bc239232 (diff)
downloadetherpad-lite-df205a4ef47554aae97f24c1f08084f50ad5156e.zip
docs
Diffstat (limited to 'doc')
-rw-r--r--doc/api/hooks_client-side.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/doc/api/hooks_client-side.md b/doc/api/hooks_client-side.md
index c0a4227a..b8a58b31 100644
--- a/doc/api/hooks_client-side.md
+++ b/doc/api/hooks_client-side.md
@@ -10,6 +10,22 @@ nothing
This hook proxies the functionality of jQuery's `$(document).ready` event.
+## aceDomLinePreProcessLineAttributes
+Called from: src/static/js/domline.js
+
+Things in context:
+
+1. domline - The current DOM line being processed
+2. cls - The class of the current block element (useful for styling)
+
+This hook is called for elements in the DOM that have the "lineMarkerAttribute" set. You can add elements into this category with the aceRegisterBlockElements hook above. This hook is run BEFORE the numbered and ordered lists logic is applied.
+
+The return value of this hook should have the following structure:
+
+`{ preHtml: String, postHtml: String, processedMarker: Boolean }`
+
+The preHtml and postHtml values will be added to the HTML display of the element, and if processedMarker is true, the engine won't try to process it any more.
+
## aceDomLineProcessLineAttributes
Called from: src/static/js/domline.js
@@ -18,7 +34,7 @@ Things in context:
1. domline - The current DOM line being processed
2. cls - The class of the current block element (useful for styling)
-This hook is called for elements in the DOM that have the "lineMarkerAttribute" set. You can add elements into this category with the aceRegisterBlockElements hook above.
+This hook is called for elements in the DOM that have the "lineMarkerAttribute" set. You can add elements into this category with the aceRegisterBlockElements hook above. This hook is run AFTER the ordered and numbered lists logic is applied.
The return value of this hook should have the following structure: