mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
Restructure headings.
This commit is contained in:
parent
5fac05a395
commit
70fb765118
9 changed files with 97 additions and 69 deletions
|
@ -1,7 +1,12 @@
|
|||
# Client-side hooks
|
||||
## Client-side hooks
|
||||
Most of these hooks are called during or in order to set up the formatting process.
|
||||
|
||||
## aceDomLineProcessLineAttributes
|
||||
All hooks registered to these events are called with two arguments:
|
||||
|
||||
1. name - the name of the hook being called
|
||||
2. context - an object with some relevant information about the context of the call
|
||||
|
||||
### aceDomLineProcessLineAttributes
|
||||
Called from: src/static/js/domline.js
|
||||
|
||||
Things in context:
|
||||
|
@ -17,7 +22,7 @@ The return value of this hook should have the following structure:
|
|||
|
||||
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.
|
||||
|
||||
## aceCreateDomLine
|
||||
### aceCreateDomLine
|
||||
Called from: src/static/js/domline.js
|
||||
|
||||
Things in context:
|
||||
|
@ -33,7 +38,7 @@ The return value of this hook should have the following structure:
|
|||
|
||||
extraOpenTags and extraCloseTags will be added before and after the element in question, and cls will be the new class of the element going forward.
|
||||
|
||||
## acePostWriteDomLineHTML
|
||||
### acePostWriteDomLineHTML
|
||||
Called from: src/static/js/domline.js
|
||||
|
||||
Things in context:
|
||||
|
@ -42,7 +47,7 @@ Things in context:
|
|||
|
||||
This hook is for right after a node has been fully formatted and written to the page.
|
||||
|
||||
## aceAttribsToClasses
|
||||
### aceAttribsToClasses
|
||||
Called from: src/static/js/linestylefilter.js
|
||||
|
||||
Things in context:
|
||||
|
@ -55,7 +60,7 @@ This hook is called during the attribute processing procedure, and should be use
|
|||
|
||||
The return value for this function should be a list of classes, which will then be parsed into a valid class string.
|
||||
|
||||
## aceGetFilterStack
|
||||
### aceGetFilterStack
|
||||
Called from: src/static/js/linestylefilter.js
|
||||
|
||||
Things in context:
|
||||
|
@ -65,14 +70,14 @@ Things in context:
|
|||
|
||||
This hook is called to apply custom regular expression filters to a set of styles. The one example available is the ep_linkify plugin, which adds internal links. They use it to find the telltale `[[ ]]` syntax that signifies internal links, and finding that syntax, they add in the internalHref attribute to be later used by the aceCreateDomLine hook (documented above).
|
||||
|
||||
## aceEditorCSS
|
||||
### aceEditorCSS
|
||||
Called from: src/static/js/ace.js
|
||||
|
||||
Things in context: None
|
||||
|
||||
This hook is provided to allow custom CSS files to be loaded. The return value should be an array of paths relative to the plugins directory.
|
||||
|
||||
## aceInitInnerdocbodyHead
|
||||
### aceInitInnerdocbodyHead
|
||||
Called from: src/static/js/ace.js
|
||||
|
||||
Things in context:
|
||||
|
@ -81,7 +86,7 @@ Things in context:
|
|||
|
||||
This hook is called during the creation of the editor HTML. The array should have lines of HTML added to it, giving the plugin author a chance to add in meta, script, link, and other tags that go into the `<head>` element of the editor HTML document.
|
||||
|
||||
## aceEditEvent
|
||||
### aceEditEvent
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
|
||||
Things in context:
|
||||
|
@ -93,14 +98,14 @@ Things in context:
|
|||
|
||||
This hook is made available to edit the edit events that might occur when changes are made. Currently you can change the editor information, some of the meanings of the edit, and so on. You can also make internal changes (internal to your plugin) that use the information provided by the edit event.
|
||||
|
||||
## aceRegisterBlockElements
|
||||
### aceRegisterBlockElements
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
|
||||
Things in context: None
|
||||
|
||||
The return value of this hook will add elements into the "lineMarkerAttribute" category, making the aceDomLineProcessLineAttributes hook (documented below) call for those elements.
|
||||
|
||||
## aceInitialized
|
||||
### aceInitialized
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
|
||||
Things in context:
|
||||
|
@ -111,7 +116,7 @@ Things in context:
|
|||
|
||||
This hook is for inserting further information into the ace engine, for later use in formatting hooks.
|
||||
|
||||
## postAceInit
|
||||
### postAceInit
|
||||
Called from: src/static/js/pad.js
|
||||
|
||||
Things in context:
|
||||
|
@ -120,11 +125,7 @@ Things in context:
|
|||
|
||||
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.
|
||||
|
||||
# Other client hooks
|
||||
|
||||
These hooks are for other parts of the software on the client side, that is, when the editor is being used.
|
||||
|
||||
## userJoinOrUpdate
|
||||
### userJoinOrUpdate
|
||||
Called from: src/static/js/pad_userlist.js
|
||||
|
||||
Things in context:
|
||||
|
@ -133,7 +134,7 @@ Things in context:
|
|||
|
||||
This hook is called on the client side whenever a user joins or changes. This can be used to create notifications or an alternate user list.
|
||||
|
||||
## collectContentPre
|
||||
### collectContentPre
|
||||
Called from: src/static/js/contentcollector.js
|
||||
|
||||
Things in context:
|
||||
|
@ -146,7 +147,7 @@ Things in context:
|
|||
|
||||
This hook is called before the content of a node is collected by the usual methods. The cc object can be used to do a bunch of things that modify the content of the pad. See, for example, the heading1 plugin for etherpad original.
|
||||
|
||||
## collectContentPost
|
||||
### collectContentPost
|
||||
Called from: src/static/js/contentcollector.js
|
||||
|
||||
Things in context:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue