mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
resolve merge conflict
This commit is contained in:
commit
58bbfd8a65
210 changed files with 12113 additions and 7505 deletions
|
@ -39,6 +39,13 @@ Returns the `rep` object.
|
|||
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
|
||||
## editorInfo.ace_setAttributeOnSelection(?)
|
||||
## editorInfo.ace_toggleAttributeOnSelection(?)
|
||||
## editorInfo.ace_getAttributeOnSelection(attribute)
|
||||
Returns a boolean if an attribute exists on a selected range.
|
||||
The attribute should be the string name of the attribute applied to the selection IE subscript
|
||||
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
|
||||
Example: `call.editorInfo.ace_getAttributeOnSelection("subscript");` // call here is the callstack from aceEditEvent.
|
||||
See the ep_subscript plugin for an example of this function in action.
|
||||
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
|
||||
## editorInfo.ace_performSelectionChange(?)
|
||||
## editorInfo.ace_doIndentOutdent(?)
|
||||
## editorInfo.ace_doUndoRedo(?)
|
||||
|
|
|
@ -60,3 +60,9 @@ Default: en
|
|||
|
||||
Example: `lang=ar` (translates the interface into Arabic)
|
||||
|
||||
## rtl
|
||||
* Boolean
|
||||
|
||||
Default: true
|
||||
Displays pad text from right to left.
|
||||
|
||||
|
|
|
@ -126,9 +126,15 @@ Called from: src/static/js/pad.js
|
|||
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.
|
||||
|
||||
## postTimesliderInit
|
||||
Called from: src/static/js/timeslider.js
|
||||
|
||||
There doesn't appear to be any example available of this particular hook being used, but it gets fired after the timeslider is all set up.
|
||||
|
||||
## userJoinOrUpdate
|
||||
Called from: src/static/js/pad_userlist.js
|
||||
|
||||
|
@ -138,6 +144,20 @@ 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.
|
||||
|
||||
## chatNewMessage
|
||||
Called from: src/static/js/chat.js
|
||||
|
||||
Things in context:
|
||||
|
||||
1. authorName - The user that wrote this message
|
||||
2. author - The authorID of the user that wrote the message
|
||||
2. text - the message text
|
||||
3. sticky (boolean) - if you want the gritter notification bubble to fade out on its own or just sit there
|
||||
3. timestamp - the timestamp of the chat message
|
||||
4. timeStr - the timestamp as a formatted string
|
||||
|
||||
This hook is called on the client side whenever a chat message is received from the server. It can be used to create different notifications for chat messages.
|
||||
|
||||
## collectContentPre
|
||||
Called from: src/static/js/contentcollector.js
|
||||
|
||||
|
@ -242,3 +262,18 @@ This hook is provided to allow whether a given line should be deliniated with mu
|
|||
Multiple authors in one line cause the creation of magic span lines. This might not suit you and
|
||||
now you can disable it and handle your own deliniation.
|
||||
The return value should be either true(disable) or false.
|
||||
|
||||
## aceSetAuthorStyle
|
||||
Called from: src/static/js/ace2_inner.js
|
||||
|
||||
Things in context:
|
||||
|
||||
1. dynamicCSS - css manger for inner ace
|
||||
2. outerDynamicCSS - css manager for outer ace
|
||||
3. parentDynamicCSS - css manager for parent document
|
||||
4. info - author style info
|
||||
5. author - author info
|
||||
6. authorSelector - css selector for author span in inner ace
|
||||
|
||||
This hook is provided to allow author highlight style to be modified.
|
||||
Registered hooks should return 1 if the plugin handles highlighting. If no plugin returns 1, the core will use the default background-based highlighting.
|
||||
|
|
|
@ -7,7 +7,7 @@ The API gives another web application control of the pads. The basic functions a
|
|||
* grant/forbid access to pads
|
||||
* get/set pad content
|
||||
|
||||
The API is designed in a way, so you can reuse your existing user system with their permissions, and map it to etherpad lite. Means: Your web application still has to do authentication, but you can tell etherpad lite via the api, which visitors should get which permissions. This allows etherpad lite to fit into any web application and extend it with real-time functionality. You can embed the pads via an iframe into your website.
|
||||
The API is designed in a way, so you can reuse your existing user system with their permissions, and map it to Etherpad. Means: Your web application still has to do authentication, but you can tell Etherpad via the api, which visitors should get which permissions. This allows Etherpad to fit into any web application and extend it with real-time functionality. You can embed the pads via an iframe into your website.
|
||||
|
||||
Take a look at [HTTP API client libraries](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) to see if a library in your favorite language.
|
||||
|
||||
|
@ -61,7 +61,9 @@ Portal submits content into new blog post
|
|||
## Usage
|
||||
|
||||
### API version
|
||||
The latest version is `1.2`
|
||||
The latest version is `1.2.8`
|
||||
|
||||
The current version can be queried via /api.
|
||||
|
||||
### Request Format
|
||||
|
||||
|
@ -101,7 +103,7 @@ Responses are valid JSON in the following format:
|
|||
|
||||
### Authentication
|
||||
|
||||
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad-Lite deployment. This token will be random string, generated by Etherpad-Lite at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad Lite. Only Etherpad Lite and the requesting application knows this key. Token management will not be exposed through this API.
|
||||
Authentication works via a token that is sent with each request as a post parameter. There is a single token per Etherpad deployment. This token will be random string, generated by Etherpad at the first start. It will be saved in APIKEY.txt in the root folder of Etherpad. Only Etherpad and the requesting application knows this key. Token management will not be exposed through this API.
|
||||
|
||||
### Node Interoperability
|
||||
|
||||
|
@ -130,7 +132,7 @@ creates a new group
|
|||
#### createGroupIfNotExistsFor(groupMapper)
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application group ids to etherpad lite group ids
|
||||
this functions helps you to map your application group ids to Etherpad group ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {groupID: g.s8oes9dhwrvt0zif}}`
|
||||
|
@ -186,7 +188,7 @@ creates a new author
|
|||
#### createAuthorIfNotExistsFor(authorMapper [, name])
|
||||
* API >= 1
|
||||
|
||||
this functions helps you to map your application author ids to etherpad lite author ids
|
||||
this functions helps you to map your application author ids to Etherpad author ids
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: {authorID: "a.s8oes9dhwrvt0zif"}}`
|
||||
|
@ -302,6 +304,66 @@ returns the text of a pad formatted as HTML
|
|||
* `{code: 0, message:"ok", data: {html:"Welcome Text<br>More Text"}}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### setHTML(padID, text)
|
||||
* API >= 1
|
||||
|
||||
sets the html of a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
* `{code: 1, message:"text too long", data: null}`
|
||||
|
||||
#### getAttributePool(padID)
|
||||
* API >= 1.2.8
|
||||
|
||||
returns the attribute pool of a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{ "code":0,
|
||||
"message":"ok",
|
||||
"data": {
|
||||
"pool":{
|
||||
"numToAttrib":{
|
||||
"0":["author","a.X4m8bBWJBZJnWGSh"],
|
||||
"1":["author","a.TotfBPzov54ihMdH"],
|
||||
"2":["author","a.StiblqrzgeNTbK05"],
|
||||
"3":["bold","true"]
|
||||
},
|
||||
"attribToNum":{
|
||||
"author,a.X4m8bBWJBZJnWGSh":0,
|
||||
"author,a.TotfBPzov54ihMdH":1,
|
||||
"author,a.StiblqrzgeNTbK05":2,
|
||||
"bold,true":3
|
||||
},
|
||||
"nextNum":4
|
||||
}
|
||||
}
|
||||
}`
|
||||
* `{"code":1,"message":"padID does not exist","data":null}`
|
||||
|
||||
#### getRevisionChangeset(padID, [rev])
|
||||
* API >= 1.2.8
|
||||
|
||||
get the changeset at a given revision, or last revision if 'rev' is not defined.
|
||||
|
||||
*Example returns:*
|
||||
* `{ "code" : 0,
|
||||
"message" : "ok",
|
||||
"data" : "Z:1>6b|5+6b$Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http://etherpad.org\n"
|
||||
}`
|
||||
* `{"code":1,"message":"padID does not exist","data":null}`
|
||||
* `{"code":1,"message":"rev is higher than the head revision of the pad","data":null}`
|
||||
|
||||
#### createDiffHTML(padID, startRev, endRev)
|
||||
* API >= 1.2.7
|
||||
|
||||
returns an object of diffs from 2 points in a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{"code":0,"message":"ok","data":{"html":"<style>\n.authora_HKIv23mEbachFYfH {background-color: #a979d9}\n.authora_n4gEeMLsv1GivNeh {background-color: #a9b5d9}\n.removed {text-decoration: line-through; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; filter: alpha(opacity=80); opacity: 0.8; }\n</style>Welcome to Etherpad!<br><br>This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!<br><br>Get involved with Etherpad at <a href=\"http://etherpad.org\">http://etherpad.org</a><br><span class=\"authora_HKIv23mEbachFYfH\">aw</span><br><br>","authors":["a.HKIv23mEbachFYfH",""]}}`
|
||||
* `{"code":4,"message":"no or wrong API Key","data":null}`
|
||||
|
||||
### Chat
|
||||
#### getChatHistory(padID, [start, end])
|
||||
* API >= 1.2.7
|
||||
|
@ -373,6 +435,24 @@ returns the list of users that are currently editing this pad
|
|||
|
||||
deletes a pad
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### copyPad(sourceID, destinationID[, force=false])
|
||||
* API >= 1.2.8
|
||||
|
||||
copies a pad with full history and chat. If force is true and the destination pad exists, it will be overwritten.
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
||||
#### movePad(sourceID, destinationID[, force=false])
|
||||
* API >= 1.2.8
|
||||
|
||||
moves a pad. If force is true and the destination pad exists, it will be overwritten.
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: null}`
|
||||
* `{code: 1, message:"padID does not exist", data: null}`
|
||||
|
@ -466,4 +546,4 @@ returns ok when the current api token is valid
|
|||
lists all pads on this epl instance
|
||||
|
||||
*Example returns:*
|
||||
* `{code: 0, message:"ok", data: ["testPad", "thePadsOfTheOthers"]}`
|
||||
* `{code: 0, message:"ok", data: {padIDs: ["testPad", "thePadsOfTheOthers"]}}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue