You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api/hooks_server-side.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Things in context: None
36
36
This function is called after a specific plugin is initialized. This would probably be more useful than the previous two functions if you only wanted to add in features to one specific plugin.
37
37
38
38
## expressConfigure
39
-
Called from: src/node/server.js
39
+
Called from: src/node/hooks/express.js
40
40
41
41
Things in context:
42
42
@@ -45,7 +45,7 @@ Things in context:
45
45
This is a helpful hook for changing the behavior and configuration of the application. It's called right after the application gets configured.
46
46
47
47
## expressCreateServer
48
-
Called from: src/node/server.js
48
+
Called from: src/node/hooks/express.js
49
49
50
50
Things in context:
51
51
@@ -72,7 +72,7 @@ Available blocks in `pad.html` are:
72
72
*`editbarMenuRight` - right tool bar
73
73
*`afterEditbar` - allows you to add stuff immediately after the toolbar
74
74
*`userlist` - the contents of the userlist dropdown
75
-
*`loading` - the intial loading message
75
+
*`loading` - the initial loading message
76
76
*`mySettings` - the left column of the settings dropdown ("My view"); intended for adding checkboxes only
77
77
*`mySettings.dropdowns` - add your dropdown settings here
78
78
*`globalSettings` - the right column of the settings dropdown ("Global view")
@@ -104,9 +104,9 @@ Things in context:
104
104
105
105
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.
Copy file name to clipboardExpand all lines: doc/api/http_api.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,42 +3,42 @@
3
3
## What can I do with this API?
4
4
The API gives another web application control of the pads. The basic functions are
5
5
6
-
* create/delete pads
6
+
* create/delete pads
7
7
* grant/forbid access to pads
8
8
* get/set pad content
9
9
10
10
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.
11
11
12
-
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.
12
+
Take a look at [HTTP API client libraries](https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries) to check if a library in your favorite programming language is available.
13
13
14
14
## Examples
15
15
16
16
### Example 1
17
17
18
-
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
18
+
A portal (such as WordPress) wants to give a user access to a new pad. Let's assume the user have the internal id 7 and his name is michael.
19
19
20
-
Portal maps the internal userid to an etherpad author.
20
+
Portal maps the internal userid to an etherpad author.
> Request: `http://pad.domain/api/1/createGroupPad?apikey=secret&groupID=g.s8oes9dhwrvt0zif&padName=samplePad&text=This is the first sentence in the pad`
35
-
>
35
+
>
36
36
> Response: `{code: 0, message:"ok", data: null}`
37
37
38
38
Portal starts the session for the user on the group:
@@ -103,7 +103,7 @@ Responses are valid JSON in the following format:
103
103
104
104
### Authentication
105
105
106
-
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.
106
+
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.
107
107
108
108
### Node Interoperability
109
109
@@ -123,7 +123,7 @@ Pads can belong to a group. The padID of grouppads is starting with a groupID li
123
123
124
124
#### createGroup()
125
125
* API >= 1
126
-
126
+
127
127
creates a new group
128
128
129
129
*Example returns:*
@@ -132,7 +132,7 @@ creates a new group
132
132
#### createGroupIfNotExistsFor(groupMapper)
133
133
* API >= 1
134
134
135
-
this functions helps you to map your application group ids to Etherpad group ids
135
+
this functions helps you to map your application group ids to Etherpad group ids
@@ -411,7 +411,7 @@ creates a chat message, saves it to the database and sends it to all connected c
411
411
*`{code: 1, message:"text is no string", data: null}`
412
412
413
413
### Pad
414
-
Group pads are normal pads, but with the name schema GROUPID$PADNAME. A security manager controls access of them and its forbidden for normal pads to include a $ in the name.
414
+
Group pads are normal pads, but with the name schema GROUPID$PADNAME. A security manager controls access of them and its forbidden for normal pads to include a $ in the name.
415
415
416
416
#### createPad(padID [, text])
417
417
* API >= 1
@@ -575,7 +575,7 @@ returns the timestamp of the last revision of the pad
Copy file name to clipboardExpand all lines: doc/localization.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Localization
2
-
Etherpad provides a multi-language user interface, that's apart from your users' content, so users from different countries can collaborate on a single document, while still having the user interface displayed in their mother tongue.
2
+
Etherpad provides a multi-language user interface, that's apart from your users' content, so users from different countries can collaborate on a single document, while still having the user interface displayed in their mother tongue.
3
3
4
4
5
5
## Translating
@@ -31,7 +31,7 @@ Translations will be send back to us regularly and will eventually appear in the
31
31
Each translation consists of a key (the id of the string that is to be translated) and the translated string. Terms in curly braces must not be touched but left as they are, since they represent a dynamically changing part of the string like a variable. Imagine a message welcoming a user: `Welcome, {{userName}}!` would be translated as `Ahoy, {{userName}}!` in pirate.
32
32
33
33
### Client-side
34
-
We use a `language` cookie to save your language settings if you change them. If you don't, we autodetect your locale using information from your browser. Now, that we know your preferred language this information is feeded into a very nice library called [html10n.js](https://github.com/marcelklehr/html10n.js), which loads the appropriate translations and applies them to our templates, providing translation params, pluralization, include rules and even a nice javascript API along the way.
34
+
We use a `language` cookie to save your language settings if you change them. If you don't, we autodetect your locale using information from your browser. Then, the preferred language is fed into a library called [html10n.js](https://github.com/marcelklehr/html10n.js), which loads the appropriate translations and applies them to our templates. Its features include translation params, pluralization, include rules and a nice javascript API.
35
35
36
36
37
37
@@ -79,7 +79,7 @@ alert(window._('pad.chat'));
79
79
}
80
80
```
81
81
82
-
Everytime the http server is started, it will auto-detect your messages and merge them automatically with the core messages.
82
+
Every time the http server is started, it will auto-detect your messages and merge them automatically with the core messages.
0 commit comments