merge develop

This commit is contained in:
John McLear 2013-03-20 01:11:27 +00:00
commit 4ea7ccd104
60 changed files with 6957 additions and 232 deletions

View file

@ -1,3 +1,15 @@
# 1.2.9
* Fix: MAJOR Security issue, where a hacker could submit content as another user
* Fix: security issue due to unescaped user input
* Fix: Admin page at /admin redirects to /admin/ now to prevent breaking relative links
* Fix: indentation in chrome on linux
* Fix: PadUsers API endpoint
* NEW: A script to import data to all dbms
* NEW: Add authorId to chat and userlist as a data attribute
* NEW Refactor and fix our frontend tests
* NEW: Localisation updates
# 1.2.81
* Fix: CtrlZ-Y for Undo Redo
* Fix: RTL functionality on contents & fix RTL/LTR tests and RTL in Safari

View file

@ -11,8 +11,8 @@ To make sure everybody is going in the same direction:
* easy to install for admins and easy to use for people
* easy to integrate into other apps, but also usable as standalone
* using less resources on server side
* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core
Also, keep it maintainable. We don't wanna end ob as the monster Etherpad was!
* extensible, as much functionality should be extendable with plugins so changes don't have to be done in core.
Also, keep it maintainable. We don't wanna end up as the monster Etherpad was!
## How to work with git?
* Don't work in your master branch.
@ -62,4 +62,4 @@ The docs are in the `doc/` folder in the git repository, so people can easily fi
Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.
You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet.
You can build the docs e.g. produce html, using `make docs`. At some point in the future we will provide an online documentation. The current documentation in the github wiki should always reflect the state of `master` (!), since there are no docs in master, yet.

View file

@ -62,10 +62,11 @@ Update to the latest version with `git pull origin`, then run `bin\installOnWind
[Next steps](#next-steps).
## Linux
## Linux/Unix
You'll need gzip, git, curl, libssl develop libraries, python and gcc.
*For Debian/Ubuntu*: `apt-get install gzip git-core curl python libssl-dev pkg-config build-essential`
*For Fedora/CentOS*: `yum install gzip git-core curl python openssl-devel && yum groupinstall "Development Tools"`
*For FreeBSD*: `portinstall node node, npm and git (optional)`
Additionally, you'll need [node.js](http://nodejs.org) installed, Ideally the latest stable version, be careful of installing nodejs from apt.

View file

@ -143,6 +143,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

1819
out/doc/api/api.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,175 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Changeset Library - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-changeset_library">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#changeset_library_changeset_library">Changeset Library</a><ul>
<li><a href="#changeset_library_changeset_unpack_changeset">Changeset.unpack(changeset)</a></li>
<li><a href="#changeset_library_changeset_opiterator_ops">Changeset.opIterator(ops)</a></li>
<li><a href="#changeset_library_the_operator_object">The Operator object</a><ul>
<li><a href="#changeset_library_example">Example</a></li>
</ul>
</li>
<li><a href="#changeset_library_apool">APool</a></li>
<li><a href="#changeset_library_atext">AText</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Changeset Library<span><a class="mark" href="#changeset_library_changeset_library" id="changeset_library_changeset_library">#</a></span></h1>
<pre><code>&quot;Z:z&gt;1|2=m=b*0|1+1$\n&quot;</code></pre>
<p>This is a Changeset. Its just a string and its very difficult to read in this form. But the Changeset Library gives us some tools to read it.
</p>
<p>A changeset describes the diff between two revisions of the document. The Browser sends changesets to the server and the server sends them to the clients to update them. This Changesets gets also saved into the history of a pad. Which allows us to go back to every revision from the past.
</p>
<h2>Changeset.unpack(changeset)<span><a class="mark" href="#changeset_library_changeset_unpack_changeset" id="changeset_library_changeset_unpack_changeset">#</a></span></h2>
<div class="signature"><ul>
<li><code>changeset</code> <span class="type">String</span></li>
</div></ul>
<p>This functions returns an object representaion of the changeset, similar to this:
</p>
<pre><code>{ oldLen: 35, newLen: 36, ops: &apos;|2=m=b*0|1+1&apos;, charBank: &apos;\n&apos; }</code></pre>
<ul>
<li><code>oldLen</code> {Number} the original length of the document.</li>
<li><code>newLen</code> {Number} the length of the document after the changeset is applied.</li>
<li><code>ops</code> {String} the actual changes, introduced by this changeset.</li>
<li><code>charBank</code> {String} All characters that are added by this changeset.</li>
</ul>
<h2>Changeset.opIterator(ops)<span><a class="mark" href="#changeset_library_changeset_opiterator_ops" id="changeset_library_changeset_opiterator_ops">#</a></span></h2>
<div class="signature"><ul>
<li><code>ops</code> <span class="type">String</span> The operators, returned by <code>Changeset.unpack()</code></li>
</div></ul>
<p>Returns an operator iterator. This iterator allows us to iterate over all operators that are in the changeset.
</p>
<p>You can iterate with an opIterator using its <code>next()</code> and <code>hasNext()</code> methods. Next returns the <code>next()</code> operator object and <code>hasNext()</code> indicates, whether there are any operators left.
</p>
<h2>The Operator object<span><a class="mark" href="#changeset_library_the_operator_object" id="changeset_library_the_operator_object">#</a></span></h2>
<p>There are 3 types of operators: <code>+</code>,<code>-</code> and <code>=</code>. These operators describe different changes to the document, beginning with the first character of the document. A <code>=</code> operator doesn&apos;t change the text, but it may add or remove text attributes. A <code>-</code> operator removes text. And a <code>+</code> Operator adds text and optionally adds some attributes to it.
</p>
<ul>
<li><code>opcode</code> {String} the operator type</li>
<li><code>chars</code> {Number} the length of the text changed by this operator.</li>
<li><code>lines</code> {Number} the number of lines changed by this operator.</li>
<li><code>attribs</code> {attribs} attributes set on this text.</li>
</ul>
<h3>Example<span><a class="mark" href="#changeset_library_example" id="changeset_library_example">#</a></span></h3>
<pre><code>{ opcode: &apos;+&apos;,
chars: 1,
lines: 1,
attribs: &apos;*0&apos; }</code></pre>
<h2>APool<span><a class="mark" href="#changeset_library_apool" id="changeset_library_apool">#</a></span></h2>
<pre><code>&gt; var AttributePoolFactory = require(&quot;./utils/AttributePoolFactory&quot;);
&gt; var apool = AttributePoolFactory.createAttributePool();
&gt; console.log(apool)
{ numToAttrib: {},
attribToNum: {},
nextNum: 0,
putAttrib: [Function],
getAttrib: [Function],
getAttribKey: [Function],
getAttribValue: [Function],
eachAttrib: [Function],
toJsonable: [Function],
fromJsonable: [Function] }</code></pre>
<p>This creates an empty apool. A apool saves which attributes were used during the history of a pad. There is one apool for each pad. It only saves the attributes that were really used, it doesn&apos;t save unused attributes. Lets fill this apool with some values
</p>
<pre><code>&gt; apool.fromJsonable({&quot;numToAttrib&quot;:{&quot;0&quot;:[&quot;author&quot;,&quot;a.kVnWeomPADAT2pn9&quot;],&quot;1&quot;:[&quot;bold&quot;,&quot;true&quot;],&quot;2&quot;:[&quot;italic&quot;,&quot;true&quot;]},&quot;nextNum&quot;:3});
&gt; console.log(apool)
{ numToAttrib:
{ &apos;0&apos;: [ &apos;author&apos;, &apos;a.kVnWeomPADAT2pn9&apos; ],
&apos;1&apos;: [ &apos;bold&apos;, &apos;true&apos; ],
&apos;2&apos;: [ &apos;italic&apos;, &apos;true&apos; ] },
attribToNum:
{ &apos;author,a.kVnWeomPADAT2pn9&apos;: 0,
&apos;bold,true&apos;: 1,
&apos;italic,true&apos;: 2 },
nextNum: 3,
putAttrib: [Function],
getAttrib: [Function],
getAttribKey: [Function],
getAttribValue: [Function],
eachAttrib: [Function],
toJsonable: [Function],
fromJsonable: [Function] }</code></pre>
<p>We used the fromJsonable function to fill the empty apool with values. the fromJsonable and toJsonable functions are used to serialize and deserialize an apool. You can see that it stores the relation between numbers and attributes. So for example the attribute 1 is the attribute bold and vise versa. A attribute is always a key value pair. For stuff like bold and italic its just &apos;italic&apos;:&apos;true&apos;. For authors its author:$AUTHORID. So a character can be bold and italic. But it can&apos;t belong to multiple authors
</p>
<pre><code>&gt; apool.getAttrib(1)
[ &apos;bold&apos;, &apos;true&apos; ]</code></pre>
<p>Simple example of how to get the key value pair for the attribute 1
</p>
<h2>AText<span><a class="mark" href="#changeset_library_atext" id="changeset_library_atext">#</a></span></h2>
<pre><code>&gt; var atext = {&quot;text&quot;:&quot;bold text\nitalic text\nnormal text\n\n&quot;,&quot;attribs&quot;:&quot;*0*1+9*0|1+1*0*1*2+b|1+1*0+b|2+2&quot;};
&gt; console.log(atext)
{ text: &apos;bold text\nitalic text\nnormal text\n\n&apos;,
attribs: &apos;*0*1+9*0|1+1*0*1*2+b|1+1*0+b|2+2&apos; }</code></pre>
<p>This is an atext. An atext has two parts: text and attribs. The text is just the text of the pad as a string. We will look closer at the attribs at the next steps
</p>
<pre><code>&gt; var opiterator = Changeset.opIterator(atext.attribs)
&gt; console.log(opiterator)
{ next: [Function: next],
hasNext: [Function: hasNext],
lastIndex: [Function: lastIndex] }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 9,
lines: 0,
attribs: &apos;*0*1&apos; }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 1,
lines: 1,
attribs: &apos;*0&apos; }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 11,
lines: 0,
attribs: &apos;*0*1*2&apos; }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 1,
lines: 1,
attribs: &apos;&apos; }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 11,
lines: 0,
attribs: &apos;*0&apos; }
&gt; opiterator.next()
{ opcode: &apos;+&apos;,
chars: 2,
lines: 2,
attribs: &apos;&apos; }</code></pre>
<p>The attribs are again a bunch of operators like .ops in the changeset was. But these operators are only + operators. They describe which part of the text has which attributes
</p>
<p>For more information see /doc/easysync/easysync-notes.txt in the source.
</p>
</div>
</body>
</html>

161
out/doc/api/editorInfo.html Normal file
View file

@ -0,0 +1,161 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>editorInfo - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-editorInfo">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#editorinfo_editorinfo">editorInfo</a><ul>
<li><a href="#editorinfo_editorinfo_ace_replacerange_start_end_text">editorInfo.ace_replaceRange(start, end, text)</a></li>
<li><a href="#editorinfo_editorinfo_ace_getrep">editorInfo.ace_getRep()</a></li>
<li><a href="#editorinfo_editorinfo_ace_getauthor">editorInfo.ace_getAuthor()</a></li>
<li><a href="#editorinfo_editorinfo_ace_incallstack">editorInfo.ace_inCallStack()</a></li>
<li><a href="#editorinfo_editorinfo_ace_incallstackifnecessary">editorInfo.ace_inCallStackIfNecessary(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_focus">editorInfo.ace_focus(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_importtext">editorInfo.ace_importText(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_importatext">editorInfo.ace_importAText(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_exporttext">editorInfo.ace_exportText(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_editorchangedsize">editorInfo.ace_editorChangedSize(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setonkeypress">editorInfo.ace_setOnKeyPress(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setonkeydown">editorInfo.ace_setOnKeyDown(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setnotifydirty">editorInfo.ace_setNotifyDirty(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_dispose">editorInfo.ace_dispose(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_getformattedcode">editorInfo.ace_getFormattedCode(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_seteditable_bool">editorInfo.ace_setEditable(bool)</a></li>
<li><a href="#editorinfo_editorinfo_ace_execcommand">editorInfo.ace_execCommand(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_callwithace_fn_callstack_normalize">editorInfo.ace_callWithAce(fn, callStack, normalize)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setproperty_key_value">editorInfo.ace_setProperty(key, value)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setbasetext_txt">editorInfo.ace_setBaseText(txt)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setbaseattributedtext_atxt_apooljsonobj">editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)</a></li>
<li><a href="#editorinfo_editorinfo_ace_applychangestobase_c_optauthor_apooljsonobj">editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)</a></li>
<li><a href="#editorinfo_editorinfo_ace_prepareuserchangeset">editorInfo.ace_prepareUserChangeset()</a></li>
<li><a href="#editorinfo_editorinfo_ace_applypreparedchangesettobase">editorInfo.ace_applyPreparedChangesetToBase()</a></li>
<li><a href="#editorinfo_editorinfo_ace_setuserchangenotificationcallback_f">editorInfo.ace_setUserChangeNotificationCallback(f)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setauthorinfo_author_info">editorInfo.ace_setAuthorInfo(author, info)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setauthorselectionrange_author_start_end">editorInfo.ace_setAuthorSelectionRange(author, start, end)</a></li>
<li><a href="#editorinfo_editorinfo_ace_getunhandlederrors">editorInfo.ace_getUnhandledErrors()</a></li>
<li><a href="#editorinfo_editorinfo_ace_getdebugproperty_prop">editorInfo.ace_getDebugProperty(prop)</a></li>
<li><a href="#editorinfo_editorinfo_ace_fastincorp">editorInfo.ace_fastIncorp(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_iscaret">editorInfo.ace_isCaret(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_getlineandcharforpoint">editorInfo.ace_getLineAndCharForPoint(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_performdocumentapplyattributestocharrange">editorInfo.ace_performDocumentApplyAttributesToCharRange(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_setattributeonselection">editorInfo.ace_setAttributeOnSelection(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_toggleattributeonselection">editorInfo.ace_toggleAttributeOnSelection(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_performselectionchange">editorInfo.ace_performSelectionChange(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_doindentoutdent">editorInfo.ace_doIndentOutdent(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_doundoredo">editorInfo.ace_doUndoRedo(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_doinsertunorderedlist">editorInfo.ace_doInsertUnorderedList(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_doinsertorderedlist">editorInfo.ace_doInsertOrderedList(?)</a></li>
<li><a href="#editorinfo_editorinfo_ace_performdocumentapplyattributestorange">editorInfo.ace_performDocumentApplyAttributesToRange()</a></li>
<li><a href="#editorinfo_editorinfo_ace_getauthorinfos">editorInfo.ace_getAuthorInfos()</a></li>
<li><a href="#editorinfo_editorinfo_ace_performdocumentreplacerange_start_end_newtext">editorInfo.ace_performDocumentReplaceRange(start, end, newText)</a></li>
<li><a href="#editorinfo_editorinfo_ace_performdocumentreplacecharrange_startchar_endchar_newtext">editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)</a></li>
<li><a href="#editorinfo_editorinfo_ace_renumberlist_linenum">editorInfo.ace_renumberList(lineNum)</a></li>
<li><a href="#editorinfo_editorinfo_ace_doreturnkey">editorInfo.ace_doReturnKey()</a></li>
<li><a href="#editorinfo_editorinfo_ace_isblockelement_element">editorInfo.ace_isBlockElement(element)</a></li>
<li><a href="#editorinfo_editorinfo_ace_getlinelisttype_linenum">editorInfo.ace_getLineListType(lineNum)</a></li>
<li><a href="#editorinfo_editorinfo_ace_caretline">editorInfo.ace_caretLine()</a></li>
<li><a href="#editorinfo_editorinfo_ace_caretcolumn">editorInfo.ace_caretColumn()</a></li>
<li><a href="#editorinfo_editorinfo_ace_caretdocchar">editorInfo.ace_caretDocChar()</a></li>
<li><a href="#editorinfo_editorinfo_ace_iswordchar">editorInfo.ace_isWordChar(?)</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>editorInfo<span><a class="mark" href="#editorinfo_editorinfo" id="editorinfo_editorinfo">#</a></span></h1>
<h2>editorInfo.ace_replaceRange(start, end, text)<span><a class="mark" href="#editorinfo_editorinfo_ace_replacerange_start_end_text" id="editorinfo_editorinfo_ace_replacerange_start_end_text">#</a></span></h2>
<p>This function replaces a range (from <code>start</code> to <code>end</code>) with <code>text</code>.
</p>
<h2>editorInfo.ace_getRep()<span><a class="mark" href="#editorinfo_editorinfo_ace_getrep" id="editorinfo_editorinfo_ace_getrep">#</a></span></h2>
<p>Returns the <code>rep</code> object.
</p>
<h2>editorInfo.ace_getAuthor()<span><a class="mark" href="#editorinfo_editorinfo_ace_getauthor" id="editorinfo_editorinfo_ace_getauthor">#</a></span></h2>
<h2>editorInfo.ace_inCallStack()<span><a class="mark" href="#editorinfo_editorinfo_ace_incallstack" id="editorinfo_editorinfo_ace_incallstack">#</a></span></h2>
<h2>editorInfo.ace_inCallStackIfNecessary(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_incallstackifnecessary" id="editorinfo_editorinfo_ace_incallstackifnecessary">#</a></span></h2>
<h2>editorInfo.ace_focus(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_focus" id="editorinfo_editorinfo_ace_focus">#</a></span></h2>
<h2>editorInfo.ace_importText(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_importtext" id="editorinfo_editorinfo_ace_importtext">#</a></span></h2>
<h2>editorInfo.ace_importAText(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_importatext" id="editorinfo_editorinfo_ace_importatext">#</a></span></h2>
<h2>editorInfo.ace_exportText(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_exporttext" id="editorinfo_editorinfo_ace_exporttext">#</a></span></h2>
<h2>editorInfo.ace_editorChangedSize(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_editorchangedsize" id="editorinfo_editorinfo_ace_editorchangedsize">#</a></span></h2>
<h2>editorInfo.ace_setOnKeyPress(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_setonkeypress" id="editorinfo_editorinfo_ace_setonkeypress">#</a></span></h2>
<h2>editorInfo.ace_setOnKeyDown(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_setonkeydown" id="editorinfo_editorinfo_ace_setonkeydown">#</a></span></h2>
<h2>editorInfo.ace_setNotifyDirty(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_setnotifydirty" id="editorinfo_editorinfo_ace_setnotifydirty">#</a></span></h2>
<h2>editorInfo.ace_dispose(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_dispose" id="editorinfo_editorinfo_ace_dispose">#</a></span></h2>
<h2>editorInfo.ace_getFormattedCode(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_getformattedcode" id="editorinfo_editorinfo_ace_getformattedcode">#</a></span></h2>
<h2>editorInfo.ace_setEditable(bool)<span><a class="mark" href="#editorinfo_editorinfo_ace_seteditable_bool" id="editorinfo_editorinfo_ace_seteditable_bool">#</a></span></h2>
<h2>editorInfo.ace_execCommand(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_execcommand" id="editorinfo_editorinfo_ace_execcommand">#</a></span></h2>
<h2>editorInfo.ace_callWithAce(fn, callStack, normalize)<span><a class="mark" href="#editorinfo_editorinfo_ace_callwithace_fn_callstack_normalize" id="editorinfo_editorinfo_ace_callwithace_fn_callstack_normalize">#</a></span></h2>
<h2>editorInfo.ace_setProperty(key, value)<span><a class="mark" href="#editorinfo_editorinfo_ace_setproperty_key_value" id="editorinfo_editorinfo_ace_setproperty_key_value">#</a></span></h2>
<h2>editorInfo.ace_setBaseText(txt)<span><a class="mark" href="#editorinfo_editorinfo_ace_setbasetext_txt" id="editorinfo_editorinfo_ace_setbasetext_txt">#</a></span></h2>
<h2>editorInfo.ace_setBaseAttributedText(atxt, apoolJsonObj)<span><a class="mark" href="#editorinfo_editorinfo_ace_setbaseattributedtext_atxt_apooljsonobj" id="editorinfo_editorinfo_ace_setbaseattributedtext_atxt_apooljsonobj">#</a></span></h2>
<h2>editorInfo.ace_applyChangesToBase(c, optAuthor, apoolJsonObj)<span><a class="mark" href="#editorinfo_editorinfo_ace_applychangestobase_c_optauthor_apooljsonobj" id="editorinfo_editorinfo_ace_applychangestobase_c_optauthor_apooljsonobj">#</a></span></h2>
<h2>editorInfo.ace_prepareUserChangeset()<span><a class="mark" href="#editorinfo_editorinfo_ace_prepareuserchangeset" id="editorinfo_editorinfo_ace_prepareuserchangeset">#</a></span></h2>
<h2>editorInfo.ace_applyPreparedChangesetToBase()<span><a class="mark" href="#editorinfo_editorinfo_ace_applypreparedchangesettobase" id="editorinfo_editorinfo_ace_applypreparedchangesettobase">#</a></span></h2>
<h2>editorInfo.ace_setUserChangeNotificationCallback(f)<span><a class="mark" href="#editorinfo_editorinfo_ace_setuserchangenotificationcallback_f" id="editorinfo_editorinfo_ace_setuserchangenotificationcallback_f">#</a></span></h2>
<h2>editorInfo.ace_setAuthorInfo(author, info)<span><a class="mark" href="#editorinfo_editorinfo_ace_setauthorinfo_author_info" id="editorinfo_editorinfo_ace_setauthorinfo_author_info">#</a></span></h2>
<h2>editorInfo.ace_setAuthorSelectionRange(author, start, end)<span><a class="mark" href="#editorinfo_editorinfo_ace_setauthorselectionrange_author_start_end" id="editorinfo_editorinfo_ace_setauthorselectionrange_author_start_end">#</a></span></h2>
<h2>editorInfo.ace_getUnhandledErrors()<span><a class="mark" href="#editorinfo_editorinfo_ace_getunhandlederrors" id="editorinfo_editorinfo_ace_getunhandlederrors">#</a></span></h2>
<h2>editorInfo.ace_getDebugProperty(prop)<span><a class="mark" href="#editorinfo_editorinfo_ace_getdebugproperty_prop" id="editorinfo_editorinfo_ace_getdebugproperty_prop">#</a></span></h2>
<h2>editorInfo.ace_fastIncorp(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_fastincorp" id="editorinfo_editorinfo_ace_fastincorp">#</a></span></h2>
<h2>editorInfo.ace_isCaret(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_iscaret" id="editorinfo_editorinfo_ace_iscaret">#</a></span></h2>
<h2>editorInfo.ace_getLineAndCharForPoint(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_getlineandcharforpoint" id="editorinfo_editorinfo_ace_getlineandcharforpoint">#</a></span></h2>
<h2>editorInfo.ace_performDocumentApplyAttributesToCharRange(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_performdocumentapplyattributestocharrange" id="editorinfo_editorinfo_ace_performdocumentapplyattributestocharrange">#</a></span></h2>
<h2>editorInfo.ace_setAttributeOnSelection(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_setattributeonselection" id="editorinfo_editorinfo_ace_setattributeonselection">#</a></span></h2>
<h2>editorInfo.ace_toggleAttributeOnSelection(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_toggleattributeonselection" id="editorinfo_editorinfo_ace_toggleattributeonselection">#</a></span></h2>
<h2>editorInfo.ace_performSelectionChange(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_performselectionchange" id="editorinfo_editorinfo_ace_performselectionchange">#</a></span></h2>
<h2>editorInfo.ace_doIndentOutdent(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_doindentoutdent" id="editorinfo_editorinfo_ace_doindentoutdent">#</a></span></h2>
<h2>editorInfo.ace_doUndoRedo(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_doundoredo" id="editorinfo_editorinfo_ace_doundoredo">#</a></span></h2>
<h2>editorInfo.ace_doInsertUnorderedList(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_doinsertunorderedlist" id="editorinfo_editorinfo_ace_doinsertunorderedlist">#</a></span></h2>
<h2>editorInfo.ace_doInsertOrderedList(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_doinsertorderedlist" id="editorinfo_editorinfo_ace_doinsertorderedlist">#</a></span></h2>
<h2>editorInfo.ace_performDocumentApplyAttributesToRange()<span><a class="mark" href="#editorinfo_editorinfo_ace_performdocumentapplyattributestorange" id="editorinfo_editorinfo_ace_performdocumentapplyattributestorange">#</a></span></h2>
<h2>editorInfo.ace_getAuthorInfos()<span><a class="mark" href="#editorinfo_editorinfo_ace_getauthorinfos" id="editorinfo_editorinfo_ace_getauthorinfos">#</a></span></h2>
<p>Returns an info object about the author. Object key = author_id and info includes author&apos;s bg color value.
Use to define your own authorship.
</p>
<h2>editorInfo.ace_performDocumentReplaceRange(start, end, newText)<span><a class="mark" href="#editorinfo_editorinfo_ace_performdocumentreplacerange_start_end_newtext" id="editorinfo_editorinfo_ace_performdocumentreplacerange_start_end_newtext">#</a></span></h2>
<p>This function replaces a range (from [x1,y1] to [x2,y2]) with <code>newText</code>.
</p>
<h2>editorInfo.ace_performDocumentReplaceCharRange(startChar, endChar, newText)<span><a class="mark" href="#editorinfo_editorinfo_ace_performdocumentreplacecharrange_startchar_endchar_newtext" id="editorinfo_editorinfo_ace_performdocumentreplacecharrange_startchar_endchar_newtext">#</a></span></h2>
<p>This function replaces a range (from y1 to y2) with <code>newText</code>.
</p>
<h2>editorInfo.ace_renumberList(lineNum)<span><a class="mark" href="#editorinfo_editorinfo_ace_renumberlist_linenum" id="editorinfo_editorinfo_ace_renumberlist_linenum">#</a></span></h2>
<p>If you delete a line, calling this method will fix the line numbering.
</p>
<h2>editorInfo.ace_doReturnKey()<span><a class="mark" href="#editorinfo_editorinfo_ace_doreturnkey" id="editorinfo_editorinfo_ace_doreturnkey">#</a></span></h2>
<p>Forces a return key at the current carret position.
</p>
<h2>editorInfo.ace_isBlockElement(element)<span><a class="mark" href="#editorinfo_editorinfo_ace_isblockelement_element" id="editorinfo_editorinfo_ace_isblockelement_element">#</a></span></h2>
<p>Returns true if your passed elment is registered as a block element
</p>
<h2>editorInfo.ace_getLineListType(lineNum)<span><a class="mark" href="#editorinfo_editorinfo_ace_getlinelisttype_linenum" id="editorinfo_editorinfo_ace_getlinelisttype_linenum">#</a></span></h2>
<p>Returns the line&apos;s html list type.
</p>
<h2>editorInfo.ace_caretLine()<span><a class="mark" href="#editorinfo_editorinfo_ace_caretline" id="editorinfo_editorinfo_ace_caretline">#</a></span></h2>
<p>Returns X position of the caret.
</p>
<h2>editorInfo.ace_caretColumn()<span><a class="mark" href="#editorinfo_editorinfo_ace_caretcolumn" id="editorinfo_editorinfo_ace_caretcolumn">#</a></span></h2>
<p>Returns Y position of the caret.
</p>
<h2>editorInfo.ace_caretDocChar()<span><a class="mark" href="#editorinfo_editorinfo_ace_caretdocchar" id="editorinfo_editorinfo_ace_caretdocchar">#</a></span></h2>
<p>Returns the Y offset starting from [x=0,y=0]
</p>
<h2>editorInfo.ace_isWordChar(?)<span><a class="mark" href="#editorinfo_editorinfo_ace_iswordchar" id="editorinfo_editorinfo_ace_iswordchar">#</a></span></h2>
</div>
</body>
</html>

View file

@ -0,0 +1,130 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Embed parameters - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-embed_parameters">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#embed_parameters_embed_parameters">Embed parameters</a><ul>
<li><a href="#embed_parameters_showlinenumbers">showLineNumbers</a></li>
<li><a href="#embed_parameters_showcontrols">showControls</a></li>
<li><a href="#embed_parameters_showchat">showChat</a></li>
<li><a href="#embed_parameters_usemonospacefont">useMonospaceFont</a></li>
<li><a href="#embed_parameters_username">userName</a></li>
<li><a href="#embed_parameters_usercolor">userColor</a></li>
<li><a href="#embed_parameters_nocolors">noColors</a></li>
<li><a href="#embed_parameters_alwaysshowchat">alwaysShowChat</a></li>
<li><a href="#embed_parameters_lang">lang</a></li>
<li><a href="#embed_parameters_rtl">rtl</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Embed parameters<span><a class="mark" href="#embed_parameters_embed_parameters" id="embed_parameters_embed_parameters">#</a></span></h1>
<p>You can easily embed your etherpad-lite into any webpage by using iframes. You can configure the embedded pad using embed paramters.
</p>
<p>Example:
</p>
<p>Cut and paste the following code into any webpage to embed a pad. The parameters below will hide the chat and the line numbers.
</p>
<pre><code>&lt;iframe src=&apos;http://pad.test.de/p/PAD_NAME?showChat=false&amp;showLineNumbers=false&apos; width=600 height=400&gt;&lt;/iframe&gt;</code></pre>
<h2>showLineNumbers<span><a class="mark" href="#embed_parameters_showlinenumbers" id="embed_parameters_showlinenumbers">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: true
</p>
<h2>showControls<span><a class="mark" href="#embed_parameters_showcontrols" id="embed_parameters_showcontrols">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: true
</p>
<h2>showChat<span><a class="mark" href="#embed_parameters_showchat" id="embed_parameters_showchat">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: true
</p>
<h2>useMonospaceFont<span><a class="mark" href="#embed_parameters_usemonospacefont" id="embed_parameters_usemonospacefont">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: false
</p>
<h2>userName<span><a class="mark" href="#embed_parameters_username" id="embed_parameters_username">#</a></span></h2>
<div class="signature"><ul>
<li>String</li>
</div></ul>
<p>Default: &quot;unnamed&quot;
</p>
<p>Example: <code>userName=Etherpad%20User</code>
</p>
<h2>userColor<span><a class="mark" href="#embed_parameters_usercolor" id="embed_parameters_usercolor">#</a></span></h2>
<div class="signature"><ul>
<li>String (css hex color value)</li>
</div></ul>
<p>Default: randomly chosen by pad server
</p>
<p>Example: <code>userColor=%23ff9900</code>
</p>
<h2>noColors<span><a class="mark" href="#embed_parameters_nocolors" id="embed_parameters_nocolors">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: false
</p>
<h2>alwaysShowChat<span><a class="mark" href="#embed_parameters_alwaysshowchat" id="embed_parameters_alwaysshowchat">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: false
</p>
<h2>lang<span><a class="mark" href="#embed_parameters_lang" id="embed_parameters_lang">#</a></span></h2>
<div class="signature"><ul>
<li>String</li>
</div></ul>
<p>Default: en
</p>
<p>Example: <code>lang=ar</code> (translates the interface into Arabic)
</p>
<h2>rtl<span><a class="mark" href="#embed_parameters_rtl" id="embed_parameters_rtl">#</a></span></h2>
<div class="signature"><ul>
<li>Boolean</li>
</div></ul>
<p>Default: true
Displays pad text from right to left.
</p>
</div>
</body>
</html>

View file

@ -0,0 +1,393 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Client-side hooks - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-hooks_client-side">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#hooks_client_side_client_side_hooks">Client-side hooks</a><ul>
<li><a href="#hooks_client_side_documentready">documentReady</a></li>
<li><a href="#hooks_client_side_acedomlineprocesslineattributes">aceDomLineProcessLineAttributes</a></li>
<li><a href="#hooks_client_side_acecreatedomline">aceCreateDomLine</a></li>
<li><a href="#hooks_client_side_acepostwritedomlinehtml">acePostWriteDomLineHTML</a></li>
<li><a href="#hooks_client_side_aceattribstoclasses">aceAttribsToClasses</a></li>
<li><a href="#hooks_client_side_acegetfilterstack">aceGetFilterStack</a></li>
<li><a href="#hooks_client_side_aceeditorcss">aceEditorCSS</a></li>
<li><a href="#hooks_client_side_aceinitinnerdocbodyhead">aceInitInnerdocbodyHead</a></li>
<li><a href="#hooks_client_side_aceeditevent">aceEditEvent</a></li>
<li><a href="#hooks_client_side_aceregisterblockelements">aceRegisterBlockElements</a></li>
<li><a href="#hooks_client_side_aceinitialized">aceInitialized</a></li>
<li><a href="#hooks_client_side_postaceinit">postAceInit</a></li>
<li><a href="#hooks_client_side_posttimesliderinit">postTimesliderInit</a></li>
<li><a href="#hooks_client_side_userjoinorupdate">userJoinOrUpdate</a></li>
<li><a href="#hooks_client_side_collectcontentpre">collectContentPre</a></li>
<li><a href="#hooks_client_side_collectcontentpost">collectContentPost</a></li>
<li><a href="#hooks_client_side_handleclientmessage_name">handleClientMessage_<code>name</code></a></li>
<li><a href="#hooks_client_side_acestartlineandcharforpoint_aceendlineandcharforpoint">aceStartLineAndCharForPoint-aceEndLineAndCharForPoint</a></li>
<li><a href="#hooks_client_side_acekeyevent">aceKeyEvent</a></li>
<li><a href="#hooks_client_side_collectcontentlinetext">collectContentLineText</a></li>
<li><a href="#hooks_client_side_collectcontentlinebreak">collectContentLineBreak</a></li>
<li><a href="#hooks_client_side_disableauthorcolorsforthisline">disableAuthorColorsForThisLine</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Client-side hooks<span><a class="mark" href="#hooks_client_side_client_side_hooks" id="hooks_client_side_client_side_hooks">#</a></span></h1>
<p>Most of these hooks are called during or in order to set up the formatting process.
</p>
<h2>documentReady<span><a class="mark" href="#hooks_client_side_documentready" id="hooks_client_side_documentready">#</a></span></h2>
<p>Called from: src/templates/pad.html
</p>
<p>Things in context:
</p>
<p>nothing
</p>
<p>This hook proxies the functionality of jQuery&apos;s <code>$(document).ready</code> event.
</p>
<h2>aceDomLineProcessLineAttributes<span><a class="mark" href="#hooks_client_side_acedomlineprocesslineattributes" id="hooks_client_side_acedomlineprocesslineattributes">#</a></span></h2>
<p>Called from: src/static/js/domline.js
</p>
<p>Things in context:
</p>
<ol>
<li>domline - The current DOM line being processed</li>
<li>cls - The class of the current block element (useful for styling)</li>
</ol>
<p>This hook is called for elements in the DOM that have the &quot;lineMarkerAttribute&quot; set. You can add elements into this category with the aceRegisterBlockElements hook above.
</p>
<p>The return value of this hook should have the following structure:
</p>
<p><code>{ preHtml: String, postHtml: String, processedMarker: Boolean }</code>
</p>
<p>The preHtml and postHtml values will be added to the HTML display of the element, and if processedMarker is true, the engine won&apos;t try to process it any more.
</p>
<h2>aceCreateDomLine<span><a class="mark" href="#hooks_client_side_acecreatedomline" id="hooks_client_side_acecreatedomline">#</a></span></h2>
<p>Called from: src/static/js/domline.js
</p>
<p>Things in context:
</p>
<ol>
<li>domline - the current DOM line being processed</li>
<li>cls - The class of the current element (useful for styling)</li>
</ol>
<p>This hook is called for any line being processed by the formatting engine, unless the aceDomLineProcessLineAttributes hook from above returned true, in which case this hook is skipped.
</p>
<p>The return value of this hook should have the following structure:
</p>
<p><code>{ extraOpenTags: String, extraCloseTags: String, cls: String }</code>
</p>
<p>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.
</p>
<h2>acePostWriteDomLineHTML<span><a class="mark" href="#hooks_client_side_acepostwritedomlinehtml" id="hooks_client_side_acepostwritedomlinehtml">#</a></span></h2>
<p>Called from: src/static/js/domline.js
</p>
<p>Things in context:
</p>
<ol>
<li>node - the DOM node that just got written to the page</li>
</ol>
<p>This hook is for right after a node has been fully formatted and written to the page.
</p>
<h2>aceAttribsToClasses<span><a class="mark" href="#hooks_client_side_aceattribstoclasses" id="hooks_client_side_aceattribstoclasses">#</a></span></h2>
<p>Called from: src/static/js/linestylefilter.js
</p>
<p>Things in context:
</p>
<ol>
<li>linestylefilter - the JavaScript object that&apos;s currently processing the ace attributes</li>
<li>key - the current attribute being processed</li>
<li>value - the value of the attribute being processed</li>
</ol>
<p>This hook is called during the attribute processing procedure, and should be used to translate key, value pairs into valid HTML classes that can be inserted into the DOM.
</p>
<p>The return value for this function should be a list of classes, which will then be parsed into a valid class string.
</p>
<h2>aceGetFilterStack<span><a class="mark" href="#hooks_client_side_acegetfilterstack" id="hooks_client_side_acegetfilterstack">#</a></span></h2>
<p>Called from: src/static/js/linestylefilter.js
</p>
<p>Things in context:
</p>
<ol>
<li>linestylefilter - the JavaScript object that&apos;s currently processing the ace attributes</li>
<li>browser - an object indicating which browser is accessing the page</li>
</ol>
<p>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 <code>[[ ]]</code> 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).
</p>
<h2>aceEditorCSS<span><a class="mark" href="#hooks_client_side_aceeditorcss" id="hooks_client_side_aceeditorcss">#</a></span></h2>
<p>Called from: src/static/js/ace.js
</p>
<p>Things in context: None
</p>
<p>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.
</p>
<h2>aceInitInnerdocbodyHead<span><a class="mark" href="#hooks_client_side_aceinitinnerdocbodyhead" id="hooks_client_side_aceinitinnerdocbodyhead">#</a></span></h2>
<p>Called from: src/static/js/ace.js
</p>
<p>Things in context:
</p>
<ol>
<li>iframeHTML - the HTML of the editor iframe up to this point, in array format</li>
</ol>
<p>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 <code>&lt;head&gt;</code> element of the editor HTML document.
</p>
<h2>aceEditEvent<span><a class="mark" href="#hooks_client_side_aceeditevent" id="hooks_client_side_aceeditevent">#</a></span></h2>
<p>Called from: src/static/js/ace2_inner.js
</p>
<p>Things in context:
</p>
<ol>
<li>callstack - a bunch of information about the current action</li>
<li>editorInfo - information about the user who is making the change</li>
<li>rep - information about where the change is being made</li>
<li>documentAttributeManager - information about attributes in the document (this is a mystery to me)</li>
</ol>
<p>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.
</p>
<h2>aceRegisterBlockElements<span><a class="mark" href="#hooks_client_side_aceregisterblockelements" id="hooks_client_side_aceregisterblockelements">#</a></span></h2>
<p>Called from: src/static/js/ace2_inner.js
</p>
<p>Things in context: None
</p>
<p>The return value of this hook will add elements into the &quot;lineMarkerAttribute&quot; category, making the aceDomLineProcessLineAttributes hook (documented below) call for those elements.
</p>
<h2>aceInitialized<span><a class="mark" href="#hooks_client_side_aceinitialized" id="hooks_client_side_aceinitialized">#</a></span></h2>
<p>Called from: src/static/js/ace2_inner.js
</p>
<p>Things in context:
</p>
<ol>
<li>editorInfo - information about the user who will be making changes through the interface, and a way to insert functions into the main ace object (see ep_headings)</li>
<li>rep - information about where the user&apos;s cursor is</li>
<li>documentAttributeManager - some kind of magic</li>
</ol>
<p>This hook is for inserting further information into the ace engine, for later use in formatting hooks.
</p>
<h2>postAceInit<span><a class="mark" href="#hooks_client_side_postaceinit" id="hooks_client_side_postaceinit">#</a></span></h2>
<p>Called from: src/static/js/pad.js
</p>
<p>Things in context:
</p>
<ol>
<li>ace - the ace object that is applied to this editor.</li>
</ol>
<p>There doesn&apos;t appear to be any example available of this particular hook being used, but it gets fired after the editor is all set up.
</p>
<h2>postTimesliderInit<span><a class="mark" href="#hooks_client_side_posttimesliderinit" id="hooks_client_side_posttimesliderinit">#</a></span></h2>
<p>Called from: src/static/js/timeslider.js
</p>
<p>There doesn&apos;t appear to be any example available of this particular hook being used, but it gets fired after the timeslider is all set up.
</p>
<h2>userJoinOrUpdate<span><a class="mark" href="#hooks_client_side_userjoinorupdate" id="hooks_client_side_userjoinorupdate">#</a></span></h2>
<p>Called from: src/static/js/pad_userlist.js
</p>
<p>Things in context:
</p>
<ol>
<li>info - the user information</li>
</ol>
<p>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.
</p>
<h2>collectContentPre<span><a class="mark" href="#hooks_client_side_collectcontentpre" id="hooks_client_side_collectcontentpre">#</a></span></h2>
<p>Called from: src/static/js/contentcollector.js
</p>
<p>Things in context:
</p>
<ol>
<li>cc - the contentcollector object</li>
<li>state - the current state of the change being made</li>
<li>tname - the tag name of this node currently being processed</li>
<li>style - the style applied to the node (probably CSS)</li>
<li>cls - the HTML class string of the node</li>
</ol>
<p>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.
</p>
<h2>collectContentPost<span><a class="mark" href="#hooks_client_side_collectcontentpost" id="hooks_client_side_collectcontentpost">#</a></span></h2>
<p>Called from: src/static/js/contentcollector.js
</p>
<p>Things in context:
</p>
<ol>
<li>cc - the contentcollector object</li>
<li>state - the current state of the change being made</li>
<li>tname - the tag name of this node currently being processed</li>
<li>style - the style applied to the node (probably CSS)</li>
<li>cls - the HTML class string of the node</li>
</ol>
<p>This hook is called after 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.
</p>
<h2>handleClientMessage_<code>name</code><span><a class="mark" href="#hooks_client_side_handleclientmessage_name" id="hooks_client_side_handleclientmessage_name">#</a></span></h2>
<p>Called from: <code>src/static/js/collab_client.js</code>
</p>
<p>Things in context:
</p>
<ol>
<li>payload - the data that got sent with the message (use it for custom message content)</li>
</ol>
<p>This hook gets called every time the client receives a message of type <code>name</code>. This can most notably be used with the new HTTP API call, &quot;sendClientsMessage&quot;, which sends a custom message type to all clients connected to a pad. You can also use this to handle existing types.
</p>
<p><code>collab_client.js</code> has a pretty extensive list of message types, if you want to take a look.
</p>
<h2>aceStartLineAndCharForPoint-aceEndLineAndCharForPoint<span><a class="mark" href="#hooks_client_side_acestartlineandcharforpoint_aceendlineandcharforpoint" id="hooks_client_side_acestartlineandcharforpoint_aceendlineandcharforpoint">#</a></span></h2>
<p>Called from: src/static/js/ace2_inner.js
</p>
<p>Things in context:
</p>
<ol>
<li>callstack - a bunch of information about the current action</li>
<li>editorInfo - information about the user who is making the change</li>
<li>rep - information about where the change is being made</li>
<li>root - the span element of the current line</li>
<li>point - the starting/ending element where the cursor highlights</li>
<li>documentAttributeManager - information about attributes in the document</li>
</ol>
<p>This hook is provided to allow a plugin to turn DOM node selection into [line,char] selection.
The return value should be an array of [line,char]
</p>
<h2>aceKeyEvent<span><a class="mark" href="#hooks_client_side_acekeyevent" id="hooks_client_side_acekeyevent">#</a></span></h2>
<p>Called from: src/static/js/ace2_inner.js
</p>
<p>Things in context:
</p>
<ol>
<li>callstack - a bunch of information about the current action</li>
<li>editorInfo - information about the user who is making the change</li>
<li>rep - information about where the change is being made</li>
<li>documentAttributeManager - information about attributes in the document</li>
<li>evt - the fired event</li>
</ol>
<p>This hook is provided to allow a plugin to handle key events.
The return value should be true if you have handled the event.
</p>
<h2>collectContentLineText<span><a class="mark" href="#hooks_client_side_collectcontentlinetext" id="hooks_client_side_collectcontentlinetext">#</a></span></h2>
<p>Called from: src/static/js/contentcollector.js
</p>
<p>Things in context:
</p>
<ol>
<li>cc - the contentcollector object</li>
<li>state - the current state of the change being made</li>
<li>tname - the tag name of this node currently being processed</li>
<li>text - the text for that line</li>
</ol>
<p>This hook allows you to validate/manipulate the text before it&apos;s sent to the server side.
The return value should be the validated/manipulated text.
</p>
<h2>collectContentLineBreak<span><a class="mark" href="#hooks_client_side_collectcontentlinebreak" id="hooks_client_side_collectcontentlinebreak">#</a></span></h2>
<p>Called from: src/static/js/contentcollector.js
</p>
<p>Things in context:
</p>
<ol>
<li>cc - the contentcollector object</li>
<li>state - the current state of the change being made</li>
<li>tname - the tag name of this node currently being processed</li>
</ol>
<p>This hook is provided to allow whether the br tag should induce a new magic domline or not.
The return value should be either true(break the line) or false.
</p>
<h2>disableAuthorColorsForThisLine<span><a class="mark" href="#hooks_client_side_disableauthorcolorsforthisline" id="hooks_client_side_disableauthorcolorsforthisline">#</a></span></h2>
<p>Called from: src/static/js/linestylefilter.js
</p>
<p>Things in context:
</p>
<ol>
<li>linestylefilter - the JavaScript object that&apos;s currently processing the ace attributes</li>
<li>text - the line text</li>
<li>class - line class</li>
</ol>
<p>This hook is provided to allow whether a given line should be deliniated with multiple authors.
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.
</p>
</div>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hooks - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-hooks_overview">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#hooks_overview_hooks">Hooks</a><ul>
<li><a href="#hooks_overview_return_values">Return values</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Hooks<span><a class="mark" href="#hooks_overview_hooks" id="hooks_overview_hooks">#</a></span></h1>
<p>All hooks are called with two arguments:
</p>
<ol>
<li>name - the name of the hook being called</li>
<li>context - an object with some relevant information about the context of the call</li>
</ol>
<h2>Return values<span><a class="mark" href="#hooks_overview_return_values" id="hooks_overview_return_values">#</a></span></h2>
<p>A hook should always return a list or undefined. Returning undefined is equivalent to returning an empty list.
All the returned lists are appended to each other, so if the return values where <code>[1, 2]</code>, <code>undefined</code>, <code>[3, 4,]</code>, <code>undefined</code> and <code>[5]</code>, the value returned by callHook would be <code>[1, 2, 3, 4, 5]</code>.
</p>
<p>This is, because it should never matter if you have one plugin or several plugins doing some work - a single plugin should be able to make callHook return the same value a set of plugins are able to return collectively. So, any plugin can return a list of values, of any length, not just one value.</p>
</div>
</body>
</html>

View file

@ -0,0 +1,329 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Server-side hooks - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-hooks_server-side">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#hooks_server_side_server_side_hooks">Server-side hooks</a><ul>
<li><a href="#hooks_server_side_loadsettings">loadSettings</a></li>
<li><a href="#hooks_server_side_pluginuninstall">pluginUninstall</a></li>
<li><a href="#hooks_server_side_plugininstall">pluginInstall</a></li>
<li><a href="#hooks_server_side_init_plugin_name">init_<code>&lt;plugin name&gt;</code></a></li>
<li><a href="#hooks_server_side_expressconfigure">expressConfigure</a></li>
<li><a href="#hooks_server_side_expresscreateserver">expressCreateServer</a></li>
<li><a href="#hooks_server_side_eejsblock_name">eejsBlock_<code>&lt;name&gt;</code></a></li>
<li><a href="#hooks_server_side_padcreate">padCreate</a></li>
<li><a href="#hooks_server_side_padload">padLoad</a></li>
<li><a href="#hooks_server_side_padupdate">padUpdate</a></li>
<li><a href="#hooks_server_side_padremove">padRemove</a></li>
<li><a href="#hooks_server_side_socketio">socketio</a></li>
<li><a href="#hooks_server_side_authorize">authorize</a></li>
<li><a href="#hooks_server_side_authenticate">authenticate</a></li>
<li><a href="#hooks_server_side_authfailure">authFailure</a></li>
<li><a href="#hooks_server_side_handlemessage">handleMessage</a></li>
<li><a href="#hooks_server_side_clientvars">clientVars</a></li>
<li><a href="#hooks_server_side_getlinehtmlforexport">getLineHTMLForExport</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Server-side hooks<span><a class="mark" href="#hooks_server_side_server_side_hooks" id="hooks_server_side_server_side_hooks">#</a></span></h1>
<p>These hooks are called on server-side.
</p>
<h2>loadSettings<span><a class="mark" href="#hooks_server_side_loadsettings" id="hooks_server_side_loadsettings">#</a></span></h2>
<p>Called from: src/node/server.js
</p>
<p>Things in context:
</p>
<ol>
<li>settings - the settings object</li>
</ol>
<p>Use this hook to receive the global settings in your plugin.
</p>
<h2>pluginUninstall<span><a class="mark" href="#hooks_server_side_pluginuninstall" id="hooks_server_side_pluginuninstall">#</a></span></h2>
<p>Called from: src/static/js/pluginfw/installer.js
</p>
<p>Things in context:
</p>
<ol>
<li>plugin_name - self-explanatory</li>
</ol>
<p>If this hook returns an error, the callback to the uninstall function gets an error as well. This mostly seems useful for handling additional features added in based on the installation of other plugins, which is pretty cool!
</p>
<h2>pluginInstall<span><a class="mark" href="#hooks_server_side_plugininstall" id="hooks_server_side_plugininstall">#</a></span></h2>
<p>Called from: src/static/js/pluginfw/installer.js
</p>
<p>Things in context:
</p>
<ol>
<li>plugin_name - self-explanatory</li>
</ol>
<p>If this hook returns an error, the callback to the install function gets an error, too. This seems useful for adding in features when a particular plugin is installed.
</p>
<h2>init_<code>&lt;plugin name&gt;</code><span><a class="mark" href="#hooks_server_side_init_plugin_name" id="hooks_server_side_init_plugin_name">#</a></span></h2>
<p>Called from: src/static/js/pluginfw/plugins.js
</p>
<p>Things in context: None
</p>
<p>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.
</p>
<h2>expressConfigure<span><a class="mark" href="#hooks_server_side_expressconfigure" id="hooks_server_side_expressconfigure">#</a></span></h2>
<p>Called from: src/node/server.js
</p>
<p>Things in context:
</p>
<ol>
<li>app - the main application object</li>
</ol>
<p>This is a helpful hook for changing the behavior and configuration of the application. It&apos;s called right after the application gets configured.
</p>
<h2>expressCreateServer<span><a class="mark" href="#hooks_server_side_expresscreateserver" id="hooks_server_side_expresscreateserver">#</a></span></h2>
<p>Called from: src/node/server.js
</p>
<p>Things in context:
</p>
<ol>
<li>app - the main express application object (helpful for adding new paths and such)</li>
<li>server - the http server object</li>
</ol>
<p>This hook gets called after the application object has been created, but before it starts listening. This is similar to the expressConfigure hook, but it&apos;s not guaranteed that the application object will have all relevant configuration variables.
</p>
<h2>eejsBlock_<code>&lt;name&gt;</code><span><a class="mark" href="#hooks_server_side_eejsblock_name" id="hooks_server_side_eejsblock_name">#</a></span></h2>
<p>Called from: src/node/eejs/index.js
</p>
<p>Things in context:
</p>
<ol>
<li>content - the content of the block</li>
</ol>
<p>This hook gets called upon the rendering of an ejs template block. For any specific kind of block, you can change how that block gets rendered by modifying the content object passed in.
</p>
<p>Have a look at <code>src/templates/pad.html</code> and <code>src/templates/timeslider.html</code> to see which blocks are available.
</p>
<h2>padCreate<span><a class="mark" href="#hooks_server_side_padcreate" id="hooks_server_side_padcreate">#</a></span></h2>
<p>Called from: src/node/db/Pad.js
</p>
<p>Things in context:
</p>
<ol>
<li>pad - the pad instance</li>
</ol>
<p>This hook gets called when a new pad was created.
</p>
<h2>padLoad<span><a class="mark" href="#hooks_server_side_padload" id="hooks_server_side_padload">#</a></span></h2>
<p>Called from: src/node/db/Pad.js
</p>
<p>Things in context:
</p>
<ol>
<li>pad - the pad instance</li>
</ol>
<p>This hook gets called when an pad was loaded. If a new pad was created and loaded this event will be emitted too.
</p>
<h2>padUpdate<span><a class="mark" href="#hooks_server_side_padupdate" id="hooks_server_side_padupdate">#</a></span></h2>
<p>Called from: src/node/db/Pad.js
</p>
<p>Things in context:
</p>
<ol>
<li>pad - the pad instance</li>
</ol>
<p>This hook gets called when an existing pad was updated.
</p>
<h2>padRemove<span><a class="mark" href="#hooks_server_side_padremove" id="hooks_server_side_padremove">#</a></span></h2>
<p>Called from: src/node/db/Pad.js
</p>
<p>Things in context:
</p>
<ol>
<li>padID</li>
</ol>
<p>This hook gets called when an existing pad was removed/deleted.
</p>
<h2>socketio<span><a class="mark" href="#hooks_server_side_socketio" id="hooks_server_side_socketio">#</a></span></h2>
<p>Called from: src/node/hooks/express/socketio.js
</p>
<p>Things in context:
</p>
<ol>
<li>app - the application object</li>
<li>io - the socketio object</li>
<li>server - the http server object</li>
</ol>
<p>I have no idea what this is useful for, someone else will have to add this description.
</p>
<h2>authorize<span><a class="mark" href="#hooks_server_side_authorize" id="hooks_server_side_authorize">#</a></span></h2>
<p>Called from: src/node/hooks/express/webaccess.js
</p>
<p>Things in context:
</p>
<ol>
<li>req - the request object</li>
<li>res - the response object</li>
<li>next - ?</li>
<li>resource - the path being accessed</li>
</ol>
<p>This is useful for modifying the way authentication is done, especially for specific paths.
</p>
<h2>authenticate<span><a class="mark" href="#hooks_server_side_authenticate" id="hooks_server_side_authenticate">#</a></span></h2>
<p>Called from: src/node/hooks/express/webaccess.js
</p>
<p>Things in context:
</p>
<ol>
<li>req - the request object</li>
<li>res - the response object</li>
<li>next - ?</li>
<li>username - the username used (optional)</li>
<li>password - the password used (optional)</li>
</ol>
<p>This is useful for modifying the way authentication is done.
</p>
<h2>authFailure<span><a class="mark" href="#hooks_server_side_authfailure" id="hooks_server_side_authfailure">#</a></span></h2>
<p>Called from: src/node/hooks/express/webaccess.js
</p>
<p>Things in context:
</p>
<ol>
<li>req - the request object</li>
<li>res - the response object</li>
<li>next - ?</li>
</ol>
<p>This is useful for modifying the way authentication is done.
</p>
<h2>handleMessage<span><a class="mark" href="#hooks_server_side_handlemessage" id="hooks_server_side_handlemessage">#</a></span></h2>
<p>Called from: src/node/handler/PadMessageHandler.js
</p>
<p>Things in context:
</p>
<ol>
<li>message - the message being handled</li>
<li>client - the client object from socket.io</li>
</ol>
<p>This hook will be called once a message arrive. If a plugin calls <code>callback(null)</code> the message will be dropped. However it is not possible to modify the message.
</p>
<p>Plugins may also decide to implement custom behavior once a message arrives.
</p>
<p><strong>WARNING</strong>: handleMessage will be called, even if the client is not authorized to send this message. It&apos;s up to the plugin to check permissions.
</p>
<p>Example:
</p>
<pre><code>function handleMessage ( hook, context, callback ) {
if ( context.message.type == &apos;USERINFO_UPDATE&apos; ) {
// If the message type is USERINFO_UPDATE, drop the message
callback(null);
}else{
callback();
}
};</code></pre>
<h2>clientVars<span><a class="mark" href="#hooks_server_side_clientvars" id="hooks_server_side_clientvars">#</a></span></h2>
<p>Called from: src/node/handler/PadMessageHandler.js
</p>
<p>Things in context:
</p>
<ol>
<li>clientVars - the basic <code>clientVars</code> built by the core</li>
<li>pad - the pad this session is about</li>
</ol>
<p>This hook will be called once a client connects and the <code>clientVars</code> are being sent. Plugins can use this hook to give the client a initial configuriation, like the tracking-id of an external analytics-tool that is used on the client-side. You can also overwrite values from the original <code>clientVars</code>.
</p>
<p>Example:
</p>
<pre><code>exports.clientVars = function(hook, context, callback)
{
// tell the client which year we are in
return callback({ &quot;currentYear&quot;: new Date().getFullYear() });
};</code></pre>
<p>This can be accessed on the client-side using <code>clientVars.currentYear</code>.
</p>
<h2>getLineHTMLForExport<span><a class="mark" href="#hooks_server_side_getlinehtmlforexport" id="hooks_server_side_getlinehtmlforexport">#</a></span></h2>
<p>Called from: src/node/utils/ExportHtml.js
</p>
<p>Things in context:
</p>
<ol>
<li>apool - pool object</li>
<li>attribLine - line attributes</li>
<li>text - line text</li>
</ol>
<p>This hook will allow a plug-in developer to re-write each line when exporting to HTML.
</p>
</div>
</body>
</html>

712
out/doc/api/http_api.html Normal file
View file

@ -0,0 +1,712 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTTP API - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-http_api">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#http_api_http_api">HTTP API</a><ul>
<li><a href="#http_api_what_can_i_do_with_this_api">What can I do with this API?</a></li>
<li><a href="#http_api_examples">Examples</a><ul>
<li><a href="#http_api_example_1">Example 1</a></li>
<li><a href="#http_api_example_2">Example 2</a></li>
</ul>
</li>
<li><a href="#http_api_usage">Usage</a><ul>
<li><a href="#http_api_api_version">API version</a></li>
<li><a href="#http_api_request_format">Request Format</a></li>
<li><a href="#http_api_response_format">Response Format</a></li>
<li><a href="#http_api_overview">Overview</a></li>
</ul>
</li>
<li><a href="#http_api_data_types">Data Types</a><ul>
<li><a href="#http_api_authentication">Authentication</a></li>
<li><a href="#http_api_node_interoperability">Node Interoperability</a></li>
<li><a href="#http_api_jsonp">JSONP</a></li>
</ul>
</li>
<li><a href="#http_api_api_methods">API Methods</a><ul>
<li><a href="#http_api_groups">Groups</a><ul>
<li><a href="#http_api_creategroup">createGroup()</a></li>
<li><a href="#http_api_creategroupifnotexistsfor_groupmapper">createGroupIfNotExistsFor(groupMapper)</a></li>
<li><a href="#http_api_deletegroup_groupid">deleteGroup(groupID)</a></li>
<li><a href="#http_api_listpads_groupid">listPads(groupID)</a></li>
<li><a href="#http_api_creategrouppad_groupid_padname_text">createGroupPad(groupID, padName [, text])</a></li>
<li><a href="#http_api_listallgroups">listAllGroups()</a></li>
</ul>
</li>
<li><a href="#http_api_author">Author</a><ul>
<li><a href="#http_api_createauthor_name">createAuthor([name])</a></li>
<li><a href="#http_api_createauthorifnotexistsfor_authormapper_name">createAuthorIfNotExistsFor(authorMapper [, name])</a></li>
<li><a href="#http_api_listpadsofauthor_authorid">listPadsOfAuthor(authorID)</a></li>
<li><a href="#http_api_getauthorname_authorid">getAuthorName(authorID)</a></li>
</ul>
</li>
<li><a href="#http_api_session">Session</a><ul>
<li><a href="#http_api_createsession_groupid_authorid_validuntil">createSession(groupID, authorID, validUntil)</a></li>
<li><a href="#http_api_deletesession_sessionid">deleteSession(sessionID)</a></li>
<li><a href="#http_api_getsessioninfo_sessionid">getSessionInfo(sessionID)</a></li>
<li><a href="#http_api_listsessionsofgroup_groupid">listSessionsOfGroup(groupID)</a></li>
<li><a href="#http_api_listsessionsofauthor_authorid">listSessionsOfAuthor(authorID)</a></li>
</ul>
</li>
<li><a href="#http_api_pad_content">Pad Content</a><ul>
<li><a href="#http_api_gettext_padid_rev">getText(padID, [rev])</a></li>
<li><a href="#http_api_settext_padid_text">setText(padID, text)</a></li>
<li><a href="#http_api_gethtml_padid_rev">getHTML(padID, [rev])</a></li>
</ul>
</li>
<li><a href="#http_api_chat">Chat</a><ul>
<li><a href="#http_api_getchathistory_padid_start_end">getChatHistory(padID, [start, end])</a></li>
<li><a href="#http_api_getchathead_padid">getChatHead(padID)</a></li>
</ul>
</li>
<li><a href="#http_api_pad">Pad</a><ul>
<li><a href="#http_api_createpad_padid_text">createPad(padID [, text])</a></li>
<li><a href="#http_api_getrevisionscount_padid">getRevisionsCount(padID)</a></li>
<li><a href="#http_api_paduserscount_padid">padUsersCount(padID)</a></li>
<li><a href="#http_api_padusers_padid">padUsers(padID)</a></li>
<li><a href="#http_api_deletepad_padid">deletePad(padID)</a></li>
<li><a href="#http_api_getreadonlyid_padid">getReadOnlyID(padID)</a></li>
<li><a href="#http_api_setpublicstatus_padid_publicstatus">setPublicStatus(padID, publicStatus)</a></li>
<li><a href="#http_api_getpublicstatus_padid">getPublicStatus(padID)</a></li>
<li><a href="#http_api_setpassword_padid_password">setPassword(padID, password)</a></li>
<li><a href="#http_api_ispasswordprotected_padid">isPasswordProtected(padID)</a></li>
<li><a href="#http_api_listauthorsofpad_padid">listAuthorsOfPad(padID)</a></li>
<li><a href="#http_api_getlastedited_padid">getLastEdited(padID)</a></li>
<li><a href="#http_api_sendclientsmessage_padid_msg">sendClientsMessage(padID, msg)</a></li>
<li><a href="#http_api_checktoken">checkToken()</a></li>
</ul>
</li>
<li><a href="#http_api_pads">Pads</a><ul>
<li><a href="#http_api_listallpads">listAllPads()</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>HTTP API<span><a class="mark" href="#http_api_http_api" id="http_api_http_api">#</a></span></h1>
<h2>What can I do with this API?<span><a class="mark" href="#http_api_what_can_i_do_with_this_api" id="http_api_what_can_i_do_with_this_api">#</a></span></h2>
<p>The API gives another web application control of the pads. The basic functions are
</p>
<ul>
<li>create/delete pads </li>
<li>grant/forbid access to pads</li>
<li>get/set pad content</li>
</ul>
<p>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.
</p>
<p>Take a look at <a href="https://github.com/ether/etherpad-lite/wiki/HTTP-API-client-libraries">HTTP API client libraries</a> to see if a library in your favorite language.
</p>
<h2>Examples<span><a class="mark" href="#http_api_examples" id="http_api_examples">#</a></span></h2>
<h3>Example 1<span><a class="mark" href="#http_api_example_1" id="http_api_example_1">#</a></span></h3>
<p>A portal (such as WordPress) wants to give a user access to a new pad. Let&apos;s assume the user have the internal id 7 and his name is michael.
</p>
<p>Portal maps the internal userid to an etherpad author.
</p>
<blockquote>
<p>Request: <code>http://pad.domain/api/1/createAuthorIfNotExistsFor?apikey=secret&amp;name=Michael&amp;authorMapper=7</code>
</p>
<p>Response: <code>{code: 0, message:&quot;ok&quot;, data: {authorID: &quot;a.s8oes9dhwrvt0zif&quot;}}</code>
</p>
</blockquote>
<p>Portal maps the internal userid to an etherpad group:
</p>
<blockquote>
<p>Request: <code>http://pad.domain/api/1/createGroupIfNotExistsFor?apikey=secret&amp;groupMapper=7</code>
</p>
<p>Response: <code>{code: 0, message:&quot;ok&quot;, data: {groupID: &quot;g.s8oes9dhwrvt0zif&quot;}}</code>
</p>
</blockquote>
<p>Portal creates a pad in the userGroup
</p>
<blockquote>
<p>Request: <code>http://pad.domain/api/1/createGroupPad?apikey=secret&amp;groupID=g.s8oes9dhwrvt0zif&amp;padName=samplePad&amp;text=This is the first sentence in the pad</code>
</p>
<p>Response: <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</p>
</blockquote>
<p>Portal starts the session for the user on the group:
</p>
<blockquote>
<p>Request: <code>http://pad.domain/api/1/createSession?apikey=secret&amp;groupID=g.s8oes9dhwrvt0zif&amp;authorID=a.s8oes9dhwrvt0zif&amp;validUntil=1312201246</code>
</p>
<p>Response: <code>{&quot;data&quot;:{&quot;sessionID&quot;: &quot;s.s8oes9dhwrvt0zif&quot;}}</code>
</p>
</blockquote>
<p>Portal places the cookie &quot;sessionID&quot; with the given value on the client and creates an iframe including the pad.
</p>
<h3>Example 2<span><a class="mark" href="#http_api_example_2" id="http_api_example_2">#</a></span></h3>
<p>A portal (such as WordPress) wants to transform the contents of a pad that multiple admins edited into a blog post.
</p>
<p>Portal retrieves the contents of the pad for entry into the db as a blog post:
</p>
<blockquote>
<p>Request: <code>http://pad.domain/api/1/getText?apikey=secret&amp;padID=g.s8oes9dhwrvt0zif$123</code>
</p>
<p>Response: <code>{code: 0, message:&quot;ok&quot;, data: {text:&quot;Welcome Text&quot;}}</code>
</p>
</blockquote>
<p>Portal submits content into new blog post
</p>
<blockquote>
<p>Portal.AddNewBlog(content)
</p>
</blockquote>
<h2>Usage<span><a class="mark" href="#http_api_usage" id="http_api_usage">#</a></span></h2>
<h3>API version<span><a class="mark" href="#http_api_api_version" id="http_api_api_version">#</a></span></h3>
<p>The latest version is <code>1.2.7</code>
</p>
<p>The current version can be queried via /api.
</p>
<h3>Request Format<span><a class="mark" href="#http_api_request_format" id="http_api_request_format">#</a></span></h3>
<p>The API is accessible via HTTP. HTTP Requests are in the format /api/$APIVERSION/$FUNCTIONNAME. Parameters are transmitted via HTTP GET. $APIVERSION depends on the endpoints you want to use.
</p>
<h3>Response Format<span><a class="mark" href="#http_api_response_format" id="http_api_response_format">#</a></span></h3>
<p>Responses are valid JSON in the following format:
</p>
<pre><code class="js">{
&quot;code&quot;: number,
&quot;message&quot;: string,
&quot;data&quot;: obj
}</code></pre>
<ul>
<li><strong>code</strong> a return code<ul>
<li><strong>0</strong> everything ok</li>
<li><strong>1</strong> wrong parameters</li>
<li><strong>2</strong> internal error</li>
<li><strong>3</strong> no such function</li>
<li><strong>4</strong> no or wrong API Key</li>
</ul>
</li>
<li><strong>message</strong> a status message. Its ok if everything is fine, else it contains an error message</li>
<li><strong>data</strong> the payload</li>
</ul>
<h3>Overview<span><a class="mark" href="#http_api_overview" id="http_api_overview">#</a></span></h3>
<p><img src="http://i.imgur.com/d0nWp.png" alt="API Overview">
</p>
<h2>Data Types<span><a class="mark" href="#http_api_data_types" id="http_api_data_types">#</a></span></h2>
<div class="signature"><ul>
<li><strong>groupID</strong> a string, the unique id of a group. Format is g.16RANDOMCHARS, for example g.s8oes9dhwrvt0zif</li>
<li><strong>sessionID</strong> a string, the unique id of a session. Format is s.16RANDOMCHARS, for example s.s8oes9dhwrvt0zif</li>
<li><strong>authorID</strong> a string, the unique id of an author. Format is a.16RANDOMCHARS, for example a.s8oes9dhwrvt0zif</li>
<li><strong>readOnlyID</strong> a string, the unique id of an readonly relation to a pad. Format is r.16RANDOMCHARS, for example r.s8oes9dhwrvt0zif</li>
<li><strong>padID</strong> a string, format is GROUPID$PADNAME, for example the pad test of group g.s8oes9dhwrvt0zif has padID g.s8oes9dhwrvt0zif$test</li>
</div></ul>
<h3>Authentication<span><a class="mark" href="#http_api_authentication" id="http_api_authentication">#</a></span></h3>
<p>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.
</p>
<h3>Node Interoperability<span><a class="mark" href="#http_api_node_interoperability" id="http_api_node_interoperability">#</a></span></h3>
<p>All functions will also be available through a node module accessable from other node.js applications.
</p>
<h3>JSONP<span><a class="mark" href="#http_api_jsonp" id="http_api_jsonp">#</a></span></h3>
<p>The API provides <em>JSONP</em> support to allow requests from a server in a different domain.
Simply add <code>&amp;jsonp=?</code> to the API call.
</p>
<p>Example usage: <a href="http://api.jquery.com/jQuery.getJSON/">http://api.jquery.com/jQuery.getJSON/</a>
</p>
<h2>API Methods<span><a class="mark" href="#http_api_api_methods" id="http_api_api_methods">#</a></span></h2>
<h3>Groups<span><a class="mark" href="#http_api_groups" id="http_api_groups">#</a></span></h3>
<p>Pads can belong to a group. The padID of grouppads is starting with a groupID like g.asdfasdfasdfasdf$test
</p>
<h4>createGroup()<span><a class="mark" href="#http_api_creategroup" id="http_api_creategroup">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>creates a new group
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {groupID: g.s8oes9dhwrvt0zif}}</code>
</p>
<h4>createGroupIfNotExistsFor(groupMapper)<span><a class="mark" href="#http_api_creategroupifnotexistsfor_groupmapper" id="http_api_creategroupifnotexistsfor_groupmapper">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>this functions helps you to map your application group ids to etherpad lite group ids
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {groupID: g.s8oes9dhwrvt0zif}}</code>
</p>
<h4>deleteGroup(groupID)<span><a class="mark" href="#http_api_deletegroup_groupid" id="http_api_deletegroup_groupid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>deletes a group
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;groupID does not exist&quot;, data: null}</code>
</p>
<h4>listPads(groupID)<span><a class="mark" href="#http_api_listpads_groupid" id="http_api_listpads_groupid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns all pads of this group
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {padIDs : [&quot;g.s8oes9dhwrvt0zif$test&quot;, &quot;g.s8oes9dhwrvt0zif$test2&quot;]}</code>
</em> <code>{code: 1, message:&quot;groupID does not exist&quot;, data: null}</code>
</p>
<h4>createGroupPad(groupID, padName [, text])<span><a class="mark" href="#http_api_creategrouppad_groupid_padname_text" id="http_api_creategrouppad_groupid_padname_text">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>creates a new pad in this group
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;pad does already exist&quot;, data: null}</code>
* <code>{code: 1, message:&quot;groupID does not exist&quot;, data: null}</code>
</p>
<h4>listAllGroups()<span><a class="mark" href="#http_api_listallgroups" id="http_api_listallgroups">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.1</li>
</div></ul>
<p>lists all existing groups
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {groupIDs: [&quot;g.mKjkmnAbSMtCt8eL&quot;, &quot;g.3ADWx6sbGuAiUmCy&quot;]}}</code>
</em> <code>{code: 0, message:&quot;ok&quot;, data: {groupIDs: []}}</code>
</p>
<h3>Author<span><a class="mark" href="#http_api_author" id="http_api_author">#</a></span></h3>
<p>These authors are bound to the attributes the users choose (color and name).
</p>
<h4>createAuthor([name])<span><a class="mark" href="#http_api_createauthor_name" id="http_api_createauthor_name">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>creates a new author
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {authorID: &quot;a.s8oes9dhwrvt0zif&quot;}}</code>
</p>
<h4>createAuthorIfNotExistsFor(authorMapper [, name])<span><a class="mark" href="#http_api_createauthorifnotexistsfor_authormapper_name" id="http_api_createauthorifnotexistsfor_authormapper_name">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>this functions helps you to map your application author ids to etherpad lite author ids
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {authorID: &quot;a.s8oes9dhwrvt0zif&quot;}}</code>
</p>
<h4>listPadsOfAuthor(authorID)<span><a class="mark" href="#http_api_listpadsofauthor_authorid" id="http_api_listpadsofauthor_authorid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns an array of all pads this author contributed to
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {padIDs: [&quot;g.s8oes9dhwrvt0zif$test&quot;, &quot;g.s8oejklhwrvt0zif$foo&quot;]}}</code>
</em> <code>{code: 1, message:&quot;authorID does not exist&quot;, data: null}</code>
</p>
<h4>getAuthorName(authorID)<span><a class="mark" href="#http_api_getauthorname_authorid" id="http_api_getauthorname_authorid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.1</li>
</div></ul>
<p>Returns the Author Name of the author
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {authorName: &quot;John McLear&quot;}}</code>
</p>
<p>-&gt; can&apos;t be deleted cause this would involve scanning all the pads where this author was
</p>
<h3>Session<span><a class="mark" href="#http_api_session" id="http_api_session">#</a></span></h3>
<p>Sessions can be created between a group and an author. This allows an author to access more than one group. The sessionID will be set as a cookie to the client and is valid until a certain date. The session cookie can also contain multiple comma-seperated sessionIDs, allowing a user to edit pads in different groups at the same time. Only users with a valid session for this group, can access group pads. You can create a session after you authenticated the user at your web application, to give them access to the pads. You should save the sessionID of this session and delete it after the user logged out.
</p>
<h4>createSession(groupID, authorID, validUntil)<span><a class="mark" href="#http_api_createsession_groupid_authorid_validuntil" id="http_api_createsession_groupid_authorid_validuntil">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>creates a new session. validUntil is an unix timestamp in seconds
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {sessionID: &quot;s.s8oes9dhwrvt0zif&quot;}}</code>
</em> <code>{code: 1, message:&quot;groupID doesn&apos;t exist&quot;, data: null}</code>
<em> <code>{code: 1, message:&quot;authorID doesn&apos;t exist&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;validUntil is in the past&quot;, data: null}</code>
</p>
<h4>deleteSession(sessionID)<span><a class="mark" href="#http_api_deletesession_sessionid" id="http_api_deletesession_sessionid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>deletes a session
</p>
<p><em>Example returns:</em>
<em> <code>{code: 1, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;sessionID does not exist&quot;, data: null}</code>
</p>
<h4>getSessionInfo(sessionID)<span><a class="mark" href="#http_api_getsessioninfo_sessionid" id="http_api_getsessioninfo_sessionid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns informations about a session
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {authorID: &quot;a.s8oes9dhwrvt0zif&quot;, groupID: g.s8oes9dhwrvt0zif, validUntil: 1312201246}}</code>
</em> <code>{code: 1, message:&quot;sessionID does not exist&quot;, data: null}</code>
</p>
<h4>listSessionsOfGroup(groupID)<span><a class="mark" href="#http_api_listsessionsofgroup_groupid" id="http_api_listsessionsofgroup_groupid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns all sessions of a group
</p>
<p><em>Example returns:</em>
<em> <code>{&quot;code&quot;:0,&quot;message&quot;:&quot;ok&quot;,&quot;data&quot;:{&quot;s.oxf2ras6lvhv2132&quot;:{&quot;groupID&quot;:&quot;g.s8oes9dhwrvt0zif&quot;,&quot;authorID&quot;:&quot;a.akf8finncvomlqva&quot;,&quot;validUntil&quot;:2312905480}}}</code>
</em> <code>{code: 1, message:&quot;groupID does not exist&quot;, data: null}</code>
</p>
<h4>listSessionsOfAuthor(authorID)<span><a class="mark" href="#http_api_listsessionsofauthor_authorid" id="http_api_listsessionsofauthor_authorid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns all sessions of an author
</p>
<p><em>Example returns:</em>
<em> <code>{&quot;code&quot;:0,&quot;message&quot;:&quot;ok&quot;,&quot;data&quot;:{&quot;s.oxf2ras6lvhv2132&quot;:{&quot;groupID&quot;:&quot;g.s8oes9dhwrvt0zif&quot;,&quot;authorID&quot;:&quot;a.akf8finncvomlqva&quot;,&quot;validUntil&quot;:2312905480}}}</code>
</em> <code>{code: 1, message:&quot;authorID does not exist&quot;, data: null}</code>
</p>
<h3>Pad Content<span><a class="mark" href="#http_api_pad_content" id="http_api_pad_content">#</a></span></h3>
<p>Pad content can be updated and retrieved through the API
</p>
<h4>getText(padID, [rev])<span><a class="mark" href="#http_api_gettext_padid_rev" id="http_api_gettext_padid_rev">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the text of a pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {text:&quot;Welcome Text&quot;}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>setText(padID, text)<span><a class="mark" href="#http_api_settext_padid_text" id="http_api_settext_padid_text">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>sets the text of a pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
* <code>{code: 1, message:&quot;text too long&quot;, data: null}</code>
</p>
<h4>getHTML(padID, [rev])<span><a class="mark" href="#http_api_gethtml_padid_rev" id="http_api_gethtml_padid_rev">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the text of a pad formatted as HTML
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {html:&quot;Welcome Text&lt;br&gt;More Text&quot;}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h3>Chat<span><a class="mark" href="#http_api_chat" id="http_api_chat">#</a></span></h3>
<h4>getChatHistory(padID, [start, end])<span><a class="mark" href="#http_api_getchathistory_padid_start_end" id="http_api_getchathistory_padid_start_end">#</a></span></h4>
<ul>
<li>API &gt;= 1.2.7</li>
</ul>
<p>returns
</p>
<ul>
<li>a part of the chat history, when <code>start</code> and <code>end</code> are given</li>
<li>the whole chat histroy, when no extra parameters are given</li>
</ul>
<p><em>Example returns:</em>
</p>
<ul>
<li><code>{&quot;code&quot;:0,&quot;message&quot;:&quot;ok&quot;,&quot;data&quot;:{&quot;messages&quot;:[{&quot;text&quot;:&quot;foo&quot;,&quot;userId&quot;:&quot;a.foo&quot;,&quot;time&quot;:1359199533759,&quot;userName&quot;:&quot;test&quot;},{&quot;text&quot;:&quot;bar&quot;,&quot;userId&quot;:&quot;a.foo&quot;,&quot;time&quot;:1359199534622,&quot;userName&quot;:&quot;test&quot;}]}}</code></li>
<li><code>{code: 1, message:&quot;start is higher or equal to the current chatHead&quot;, data: null}</code></li>
<li><code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code></li>
</ul>
<h4>getChatHead(padID)<span><a class="mark" href="#http_api_getchathead_padid" id="http_api_getchathead_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.2.7</li>
</div></ul>
<p>returns the chatHead (last number of the last chat-message) of the pad
</p>
<p><em>Example returns:</em>
</p>
<ul>
<li><code>{code: 0, message:&quot;ok&quot;, data: {chatHead: 42}}</code></li>
<li><code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code></li>
</ul>
<h3>Pad<span><a class="mark" href="#http_api_pad" id="http_api_pad">#</a></span></h3>
<p>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.
</p>
<h4>createPad(padID [, text])<span><a class="mark" href="#http_api_createpad_padid_text" id="http_api_createpad_padid_text">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>creates a new (non-group) pad. Note that if you need to create a group Pad, you should call <strong>createGroupPad</strong>.
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;pad does already exist&quot;, data: null}</code>
</p>
<h4>getRevisionsCount(padID)<span><a class="mark" href="#http_api_getrevisionscount_padid" id="http_api_getrevisionscount_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the number of revisions of this pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {revisions: 56}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>padUsersCount(padID)<span><a class="mark" href="#http_api_paduserscount_padid" id="http_api_paduserscount_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the number of user that are currently editing this pad
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: {padUsersCount: 5}}</code>
</p>
<h4>padUsers(padID)<span><a class="mark" href="#http_api_padusers_padid" id="http_api_padusers_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.1</li>
</div></ul>
<p>returns the list of users that are currently editing this pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {padUsers: [{colorId:&quot;#c1a9d9&quot;,&quot;name&quot;:&quot;username1&quot;,&quot;timestamp&quot;:1345228793126,&quot;id&quot;:&quot;a.n4gEeMLsvg12452n&quot;},{&quot;colorId&quot;:&quot;#d9a9cd&quot;,&quot;name&quot;:&quot;Hmmm&quot;,&quot;timestamp&quot;:1345228796042,&quot;id&quot;:&quot;a.n4gEeMLsvg12452n&quot;}]}}</code>
</em> <code>{code: 0, message:&quot;ok&quot;, data: {padUsers: []}}</code>
</p>
<h4>deletePad(padID)<span><a class="mark" href="#http_api_deletepad_padid" id="http_api_deletepad_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>deletes a pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>getReadOnlyID(padID)<span><a class="mark" href="#http_api_getreadonlyid_padid" id="http_api_getreadonlyid_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the read only link of a pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {readOnlyID: &quot;r.s8oes9dhwrvt0zif&quot;}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>setPublicStatus(padID, publicStatus)<span><a class="mark" href="#http_api_setpublicstatus_padid_publicstatus" id="http_api_setpublicstatus_padid_publicstatus">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>sets a boolean for the public status of a pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>getPublicStatus(padID)<span><a class="mark" href="#http_api_getpublicstatus_padid" id="http_api_getpublicstatus_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>return true of false
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {publicStatus: true}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>setPassword(padID, password)<span><a class="mark" href="#http_api_setpassword_padid_password" id="http_api_setpassword_padid_password">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns ok or a error message
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: null}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>isPasswordProtected(padID)<span><a class="mark" href="#http_api_ispasswordprotected_padid" id="http_api_ispasswordprotected_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns true or false
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {passwordProtection: true}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>listAuthorsOfPad(padID)<span><a class="mark" href="#http_api_listauthorsofpad_padid" id="http_api_listauthorsofpad_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns an array of authors who contributed to this pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {authorIDs : [&quot;a.s8oes9dhwrvt0zif&quot;, &quot;a.akf8finncvomlqva&quot;]}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>getLastEdited(padID)<span><a class="mark" href="#http_api_getlastedited_padid" id="http_api_getlastedited_padid">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1</li>
</div></ul>
<p>returns the timestamp of the last revision of the pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {lastEdited: 1340815946602}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>sendClientsMessage(padID, msg)<span><a class="mark" href="#http_api_sendclientsmessage_padid_msg" id="http_api_sendclientsmessage_padid_msg">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.1</li>
</div></ul>
<p>sends a custom message of type <code>msg</code> to the pad
</p>
<p><em>Example returns:</em>
<em> <code>{code: 0, message:&quot;ok&quot;, data: {}}</code>
</em> <code>{code: 1, message:&quot;padID does not exist&quot;, data: null}</code>
</p>
<h4>checkToken()<span><a class="mark" href="#http_api_checktoken" id="http_api_checktoken">#</a></span></h4>
<div class="signature"><ul>
<li>API &gt;= 1.2</li>
</div></ul>
<p>returns ok when the current api token is valid
</p>
<p><em>Example returns:</em>
<em> <code>{&quot;code&quot;:0,&quot;message&quot;:&quot;ok&quot;,&quot;data&quot;:null}</code>
</em> <code>{&quot;code&quot;:4,&quot;message&quot;:&quot;no or wrong API Key&quot;,&quot;data&quot;:null}</code>
</p>
<h3>Pads<span><a class="mark" href="#http_api_pads" id="http_api_pads">#</a></span></h3>
<h4>listAllPads()<span><a class="mark" href="#http_api_listallpads" id="http_api_listallpads">#</a></span></h4>
<ul>
<li>API &gt;= 1.2.1</li>
</ul>
<p>lists all pads on this epl instance
</p>
<p><em>Example returns:</em>
* <code>{code: 0, message:&quot;ok&quot;, data: [&quot;testPad&quot;, &quot;thePadsOfTheOthers&quot;]}</code>
</p>
</div>
</body>
</html>

51
out/doc/api/pluginfw.html Normal file
View file

@ -0,0 +1,51 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Plugin Framework - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-pluginfw">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#pluginfw_plugin_framework">Plugin Framework</a><ul>
<li><a href="#pluginfw_plugins_update">plugins.update</a></li>
<li><a href="#pluginfw_hooks_callall">hooks.callAll</a></li>
<li><a href="#pluginfw_hooks_acallall">hooks.aCallAll</a></li>
<li><a href="#pluginfw">...</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Plugin Framework<span><a class="mark" href="#pluginfw_plugin_framework" id="pluginfw_plugin_framework">#</a></span></h1>
<p><code>require(&quot;ep_etherpad-lite/static/js/plugingfw/plugins&quot;)</code>
</p>
<h2>plugins.update<span><a class="mark" href="#pluginfw_plugins_update" id="pluginfw_plugins_update">#</a></span></h2>
<p><code>require(&quot;ep_etherpad-lite/static/js/plugingfw/plugins&quot;).update()</code> will use npm to list all installed modules and read their ep.json files, registering the contained hooks.
A hook registration is a pairs of a hook name and a function reference (filename for require() plus function name)
</p>
<h2>hooks.callAll<span><a class="mark" href="#pluginfw_hooks_callall" id="pluginfw_hooks_callall">#</a></span></h2>
<p><code>require(&quot;ep_etherpad-lite/static/js/plugingfw/hooks&quot;).callAll(&quot;hook_name&quot;, {argname:value})</code> will call all hook functions registered for <code>hook_name</code> with <code>{argname:value}</code>.
</p>
<h2>hooks.aCallAll<span><a class="mark" href="#pluginfw_hooks_acallall" id="pluginfw_hooks_acallall">#</a></span></h2>
<p>?
</p>
<h2>...<span><a class="mark" href="#pluginfw" id="pluginfw">#</a></span></h2>
</div>
</body>
</html>

44
out/doc/assets/style.css Normal file
View file

@ -0,0 +1,44 @@
body.apidoc {
width: 60%;
min-width: 10cm;
margin: 0 auto;
}
#header {
background-color: #5a5;
padding: 10px;
color: #111;
}
a,
a:active {
color: #272;
}
a:focus,
a:hover {
color: #050;
}
#apicontent a.mark,
#apicontent a.mark:active {
float: right;
color: #BBB;
font-size: 0.7cm;
text-decoration: none;
}
#apicontent a.mark:focus,
#apicontent a.mark:hover {
color: #AAA;
}
#apicontent code {
padding: 1px;
background-color: #EEE;
border-radius: 4px;
border: 1px solid #DDD;
}
#apicontent pre>code {
display: block;
overflow: auto;
padding: 5px;
}

View file

@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Custom static files - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-custom_static">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#custom_static_custom_static_files">Custom static files</a></li>
</ul>
</div>
<div id="apicontent">
<h1>Custom static files<span><a class="mark" href="#custom_static_custom_static_files" id="custom_static_custom_static_files">#</a></span></h1>
<p>Etherpad Lite allows you to include your own static files in the browser, by modifying the files in <code>static/custom</code>.
</p>
<ul>
<li><code>index.js</code> Javascript that&apos;ll be run in <code>/</code></li>
<li><code>index.css</code> Stylesheet affecting <code>/</code></li>
<li><code>pad.js</code> Javascript that&apos;ll be run in <code>/p/:padid</code></li>
<li><code>pad.css</code> Stylesheet affecting <code>/p/:padid</code></li>
<li><code>timeslider.js</code> Javascript that&apos;ll be run in <code>/p/:padid/timeslider</code></li>
<li><code>timeslider.css</code> Stylesheet affecting <code>/p/:padid/timeslider</code></li>
<li><code>favicon.ico</code> Overrides the default favicon.</li>
<li><code>robots.txt</code> Overrides the default <code>robots.txt</code>.</li>
</ul>
</div>
</body>
</html>

132
out/doc/database.html Normal file
View file

@ -0,0 +1,132 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Database structure - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-database">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#database_database_structure">Database structure</a><ul>
<li><a href="#database_keys_and_their_values">Keys and their values</a><ul>
<li><a href="#database_groups">groups</a></li>
<li><a href="#database_pad_padid">pad:$PADID</a></li>
<li><a href="#database_pad_padid_revs_revnum">pad:$PADID:revs:$REVNUM</a></li>
<li><a href="#database_pad_padid_chat_chatnum">pad:$PADID:chat:$CHATNUM</a></li>
<li><a href="#database_pad2readonly_padid">pad2readonly:$PADID</a></li>
<li><a href="#database_readonly2pad_readonlyid">readonly2pad:$READONLYID</a></li>
<li><a href="#database_token2author_tokenid">token2author:$TOKENID</a></li>
<li><a href="#database_globalauthor_authorid">globalAuthor:$AUTHORID</a></li>
<li><a href="#database_mapper2group_mapper">mapper2group:$MAPPER</a></li>
<li><a href="#database_mapper2author_mapper">mapper2author:$MAPPER</a></li>
<li><a href="#database_group_groupid">group:$GROUPID</a></li>
<li><a href="#database_session_sessionid">session:$SESSIONID</a></li>
<li><a href="#database_author2sessions_authorid">author2sessions:$AUTHORID</a></li>
<li><a href="#database_group2sessions_groupid">group2sessions:$GROUPID</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Database structure<span><a class="mark" href="#database_database_structure" id="database_database_structure">#</a></span></h1>
<h2>Keys and their values<span><a class="mark" href="#database_keys_and_their_values" id="database_keys_and_their_values">#</a></span></h2>
<h3>groups<span><a class="mark" href="#database_groups" id="database_groups">#</a></span></h3>
<p>A list of all existing groups (a JSON object with groupIDs as keys and <code>1</code> as values).
</p>
<h3>pad:$PADID<span><a class="mark" href="#database_pad_padid" id="database_pad_padid">#</a></span></h3>
<p>Saves all informations about pads
</p>
<ul>
<li><strong>atext</strong> - the latest attributed text</li>
<li><strong>pool</strong> - the attribute pool</li>
<li><strong>head</strong> - the number of the latest revision</li>
<li><strong>chatHead</strong> - the number of the latest chat entry</li>
<li><strong>public</strong> - flag that disables security for this pad</li>
<li><strong>passwordHash</strong> - string that contains a bcrypt hashed password for this pad</li>
</ul>
<h3>pad:$PADID:revs:$REVNUM<span><a class="mark" href="#database_pad_padid_revs_revnum" id="database_pad_padid_revs_revnum">#</a></span></h3>
<p>Saves a revision $REVNUM of pad $PADID
</p>
<ul>
<li><strong>meta</strong><ul>
<li><strong>author</strong> - the autorID of this revision</li>
<li><strong>timestamp</strong> - the timestamp of when this revision was created</li>
</ul>
</li>
<li><strong>changeset</strong> - the changeset of this revision</li>
</ul>
<h3>pad:$PADID:chat:$CHATNUM<span><a class="mark" href="#database_pad_padid_chat_chatnum" id="database_pad_padid_chat_chatnum">#</a></span></h3>
<p>Saves a chatentry with num $CHATNUM of pad $PADID
</p>
<ul>
<li><strong>text</strong> - the text of this chat entry</li>
<li><strong>userId</strong> - the autorID of this chat entry</li>
<li><strong>time</strong> - the timestamp of this chat entry</li>
</ul>
<h3>pad2readonly:$PADID<span><a class="mark" href="#database_pad2readonly_padid" id="database_pad2readonly_padid">#</a></span></h3>
<p>Translates a padID to a readonlyID
</p>
<h3>readonly2pad:$READONLYID<span><a class="mark" href="#database_readonly2pad_readonlyid" id="database_readonly2pad_readonlyid">#</a></span></h3>
<p>Translates a readonlyID to a padID
</p>
<h3>token2author:$TOKENID<span><a class="mark" href="#database_token2author_tokenid" id="database_token2author_tokenid">#</a></span></h3>
<p>Translates a token to an authorID
</p>
<h3>globalAuthor:$AUTHORID<span><a class="mark" href="#database_globalauthor_authorid" id="database_globalauthor_authorid">#</a></span></h3>
<p>Information about an author
</p>
<ul>
<li><strong>name</strong> - the name of this author as shown in the pad</li>
<li><strong>colorID</strong> - the colorID of this author as shown in the pad</li>
</ul>
<h3>mapper2group:$MAPPER<span><a class="mark" href="#database_mapper2group_mapper" id="database_mapper2group_mapper">#</a></span></h3>
<p>Maps an external application identifier to an internal group
</p>
<h3>mapper2author:$MAPPER<span><a class="mark" href="#database_mapper2author_mapper" id="database_mapper2author_mapper">#</a></span></h3>
<p>Maps an external application identifier to an internal author
</p>
<h3>group:$GROUPID<span><a class="mark" href="#database_group_groupid" id="database_group_groupid">#</a></span></h3>
<p>a group of pads
</p>
<ul>
<li><strong>pads</strong> - object with pad names in it, values are 1<h3>session:$SESSIONID<span><a class="mark" href="#database_session_sessionid" id="database_session_sessionid">#</a></span></h3>
a session between an author and a group</li>
</ul>
<ul>
<li><strong>groupID</strong> - the groupID the session belongs too</li>
<li><strong>authorID</strong> - the authorID the session belongs too</li>
<li><strong>validUntil</strong> - the timestamp until this session is valid</li>
</ul>
<h3>author2sessions:$AUTHORID<span><a class="mark" href="#database_author2sessions_authorid" id="database_author2sessions_authorid">#</a></span></h3>
<p>saves the sessions of an author
</p>
<ul>
<li><strong>sessionsIDs</strong> - object with sessionIDs in it, values are 1</li>
</ul>
<h3>group2sessions:$GROUPID<span><a class="mark" href="#database_group2sessions_groupid" id="database_group2sessions_groupid">#</a></span></h3>
<div class="signature"><ul>
<li><strong>sessionsIDs</strong> - object with sessionIDs in it, values are 1</li>
</div></ul>
</div>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>About this Documentation - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-documentation">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#documentation_about_this_documentation">About this Documentation</a></li>
</ul>
</div>
<div id="apicontent">
<h1>About this Documentation<span><a class="mark" href="#documentation_about_this_documentation" id="documentation_about_this_documentation">#</a></span></h1>
<!-- type=misc -->
<p>The goal of this documentation is to comprehensively explain Etherpad-Lite,
both from a reference as well as a conceptual point of view.
</p>
<p>Where appropriate, property types, method arguments, and the arguments
provided to event handlers are detailed in a list underneath the topic
heading.
</p>
<p>Every <code>.html</code> file is generated based on the corresponding
<code>.markdown</code> file in the <code>doc/api/</code> folder in the source tree. The
documentation is generated using the <code>tools/doc/generate.js</code> program.
The HTML template is located at <code>doc/template.html</code>.</p>
</div>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>About this folder - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-README">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#readme_about_this_folder">About this folder</a></li>
</ul>
</div>
<div id="apicontent">
<h1>About this folder<span><a class="mark" href="#readme_about_this_folder" id="readme_about_this_folder">#</a></span></h1>
<p>We put all documentations we found about the old Etherpad together in this folder. Most of this is still valid for Etherpad Lite</p>
</div>
</body>
</html>

2202
out/doc/index.html Normal file

File diff suppressed because it is too large Load diff

130
out/doc/localization.html Normal file
View file

@ -0,0 +1,130 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Localization - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-localization">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#localization_localization">Localization</a><ul>
<li><a href="#localization_translating">Translating</a></li>
<li><a href="#localization_implementation">Implementation</a><ul>
<li><a href="#localization_server_side">Server-side</a></li>
<li><a href="#localization_client_side">Client-side</a></li>
</ul>
</li>
<li><a href="#localization_localizing_plugins">Localizing plugins</a><ul>
<li><a href="#localization_1_mark_the_strings_to_translate">1. Mark the strings to translate</a></li>
<li><a href="#localization_2_create_translate_files_in_the_locales_directory_of_your_plugin">2. Create translate files in the locales directory of your plugin</a></li>
<li><a href="#localization_overwrite_core_messages">Overwrite core messages</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Localization<span><a class="mark" href="#localization_localization" id="localization_localization">#</a></span></h1>
<p>Etherpad lite provides a multi-language user interface, that&apos;s apart from your users&apos; content, so users from different countries can collaborate on a single document, while still having the user interface displayed in their mother tongue.
</p>
<h2>Translating<span><a class="mark" href="#localization_translating" id="localization_translating">#</a></span></h2>
<p>We rely on <a href="http://translatewiki.net">http://translatewiki.net</a> to handle the translation process for us, so if you&apos;d like to help...
</p>
<ol>
<li>sign up at <a href="http://translatewiki.net">http://translatewiki.net</a></li>
<li>Visit our <a href="https://translatewiki.net/wiki/Translating:Etherpad_lite">TWN project page</a></li>
<li>Click on <code>Translate Etherpad lite interface</code></li>
<li>Choose a target language, you&apos;d like to translate our interface to, and hit <code>Fetch</code></li>
<li>Start translating!</li>
</ol>
<p>Translations will be send back to us regularly and will eventually appear in the next release.
</p>
<h2>Implementation<span><a class="mark" href="#localization_implementation" id="localization_implementation">#</a></span></h2>
<h3>Server-side<span><a class="mark" href="#localization_server_side" id="localization_server_side">#</a></span></h3>
<p><code>/src/locales</code> contains files for all supported languages which contain the translated strings. Translation files are simple <code>*.json</code> files and look like this:
</p>
<pre><code class="json">{ &quot;pad.modals.connected&quot;: &quot;Connect<EFBFBD>.&quot;
, &quot;pad.modals.uderdup&quot;: &quot;Ouvrir dans une nouvelle fen<65>tre.&quot;
, &quot;pad.toolbar.unindent.title&quot;: &quot;D<EFBFBD>sindenter&quot;
, &quot;pad.toolbar.undo.title&quot;: &quot;Annuler (Ctrl-Z)&quot;
, &quot;timeslider.pageTitle&quot;: &quot;{{appTitle}} Curseur temporel&quot;
, ...
}</code></pre>
<p>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: <code>Welcome, {{userName}}!</code> would be translated as <code>Ahoy, {{userName}}!</code> in pirate.
</p>
<h3>Client-side<span><a class="mark" href="#localization_client_side" id="localization_client_side">#</a></span></h3>
<p>We use a <code>language</code> cookie to save your language settings if you change them. If you don&apos;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 <a href="https://github.com/marcelklehr/html10n.js">html10n.js</a>, 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.
</p>
<h2>Localizing plugins<span><a class="mark" href="#localization_localizing_plugins" id="localization_localizing_plugins">#</a></span></h2>
<h3>1. Mark the strings to translate<span><a class="mark" href="#localization_1_mark_the_strings_to_translate" id="localization_1_mark_the_strings_to_translate">#</a></span></h3>
<p>In the template files of your plugin, change all hardcoded messages/strings...
</p>
<p>from:
</p>
<pre><code class="html">&lt;option value=&quot;0&quot;&gt;Heading 1&lt;/option&gt;</code></pre>
<p>to:
</p>
<pre><code class="html">&lt;option data-l10n-id=&quot;ep_heading.h1&quot; value=&quot;0&quot;&gt;&lt;/option&gt;</code></pre>
<p>In the javascript files of your plugin, chaneg all hardcoded messages/strings...
</p>
<p>from:
</p>
<pre><code class="js">alert (&apos;Chat&apos;);</code></pre>
<p>to:
</p>
<pre><code class="js">alert(window._(&apos;pad.chat&apos;));</code></pre>
<h3>2. Create translate files in the locales directory of your plugin<span><a class="mark" href="#localization_2_create_translate_files_in_the_locales_directory_of_your_plugin" id="localization_2_create_translate_files_in_the_locales_directory_of_your_plugin">#</a></span></h3>
<div class="signature"><ul>
<li>The name of the file must be the language code of the language it contains translations for (see <a href="http://joker-x.github.com/languages4translatewiki/test/">supported lang codes</a>; e.g. en ? English, es ? Spanish...)</li>
<li>The extension of the file must be <code>.json</code></li>
<li>The default language is English, so your plugin should always provide <code>en.json</code></li>
<li><p>In order to avoid naming conflicts, your message keys should start with the name of your plugin followed by a dot (see below)</p>
</li>
<li><p>ep_your-plugin/locales/en.json*</p>
<pre><code>&lt;span class=&quot;type&quot;&gt; &quot;ep_your-plugin.h1&quot;: &quot;Heading 1&quot;
&lt;/span&gt;</code></pre>
</li>
<li><p>ep_your-plugin/locales/es.json*</p>
<pre><code>&lt;span class=&quot;type&quot;&gt; &quot;ep_your-plugin.h1&quot;: &quot;T<EFBFBD>tulo 1&quot;
&lt;/span&gt;</code></pre>
</li>
</div></ul>
<p>Everytime the http server is started, it will auto-detect your messages and merge them automatically with the core messages.
</p>
<h3>Overwrite core messages<span><a class="mark" href="#localization_overwrite_core_messages" id="localization_overwrite_core_messages">#</a></span></h3>
<p>You can overwrite Etherpad Lite&apos;s core messages in your plugin&apos;s locale files.
For example, if you want to replace <code>Chat</code> with <code>Notes</code>, simply add...
</p>
<p><em>ep_your-plugin/locales/en.json</em>
</p>
<pre><code>{ &quot;ep_your-plugin.h1&quot;: &quot;Heading 1&quot;
, &quot;pad.chat&quot;: &quot;Notes&quot;
}</code></pre>
</div>
</body>
</html>

169
out/doc/plugins.html Normal file
View file

@ -0,0 +1,169 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Plugins - Etherpad Lite v1.2.81 Manual &amp; Documentation</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body class="apidoc" id="api-section-plugins">
<header id="header">
<h1>Etherpad-Lite v1.2.81 Manual &amp; Documentation</h1>
</header>
<div id="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#plugins_plugins">Plugins</a><ul>
<li><a href="#plugins_folder_structure">Folder structure</a></li>
<li><a href="#plugins_plugin_definition">Plugin definition</a><ul>
<li><a href="#plugins_client_hooks_and_server_hooks">Client hooks and server hooks</a></li>
<li><a href="#plugins_parts">Parts</a><ul>
<li><a href="#plugins_pre_post">pre/post</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#plugins_package_definition">Package definition</a></li>
<li><a href="#plugins_templates">Templates</a></li>
<li><a href="#plugins_writing_and_running_front_end_tests_for_your_plugin">Writing and running front-end tests for your plugin</a></li>
</ul>
</li>
</ul>
</div>
<div id="apicontent">
<h1>Plugins<span><a class="mark" href="#plugins_plugins" id="plugins_plugins">#</a></span></h1>
<p>Etherpad-Lite allows you to extend its functionality with plugins. A plugin registers hooks (functions) for certain events (thus certain features) in Etherpad-lite to execute its own functionality based on these events.
</p>
<p>Publicly available plugins can be found in the npm registry (see <a href="http://npmjs.org">http://npmjs.org</a>). Etherpad-lite&apos;s naming convention for plugins is to prefix your plugins with <code>ep_</code>. So, e.g. it&apos;s <code>ep_flubberworms</code>. Thus you can install plugins from npm, using <code>npm install ep_flubberworm</code> in etherpad-lite&apos;s root directory.
</p>
<p>You can also browse to <code>http://yourEtherpadInstan.ce/admin/plugins</code>, which will list all installed plugins and those available on npm. It even provides functionality to search through all available plugins.
</p>
<h2>Folder structure<span><a class="mark" href="#plugins_folder_structure" id="plugins_folder_structure">#</a></span></h2>
<p>A basic plugin usually has the following folder structure:
</p>
<pre><code>ep_&lt;plugin&gt;/
| static/
| templates/
| locales/
+ ep.json
+ package.json</code></pre>
<p>If your plugin includes client-side hooks, put them in <code>static/js/</code>. If you&apos;re adding in CSS or image files, you should put those files in <code>static/css/ </code>and <code>static/image/</code>, respectively, and templates go into <code>templates/</code>. Translations go into <code>locales/</code>
</p>
<p>A Standard directory structure like this makes it easier to navigate through your code. That said, do note, that this is not actually <em>required</em> to make your plugin run. If you want to make use of our i18n system, you need to put your translations into <code>locales/</code>, though, in order to have them intergated. (See &quot;Localization&quot; for more info on how to localize your plugin)
</p>
<h2>Plugin definition<span><a class="mark" href="#plugins_plugin_definition" id="plugins_plugin_definition">#</a></span></h2>
<p>Your plugin definition goes into <code>ep.json</code>. In this file you register your hooks, indicate the parts of your plugin and the order of execution. (A documentation of all available events to hook into can be found in chapter <a href="#all_hooks">hooks</a>.)
</p>
<p>A hook registration is a pairs of a hook name and a function reference (filename to require() + exported function name)
</p>
<pre><code class="json">{
&quot;parts&quot;: [
{
&quot;name&quot;: &quot;nameThisPartHoweverYouWant&quot;,
&quot;hooks&quot;: {
&quot;authenticate&quot; : &quot;ep_&lt;plugin&gt;/&lt;file&gt;:FUNCTIONNAME1&quot;,
&quot;expressCreateServer&quot;: &quot;ep_&lt;plugin&gt;/&lt;file&gt;:FUNCTIONNAME2&quot;
},
&quot;client_hooks&quot;: {
&quot;acePopulateDOMLine&quot;: &quot;ep_plugin/&lt;file&gt;:FUNCTIONNAME3&quot;
}
}
]
}</code></pre>
<p>Etherpad-lite will expect the part of the hook definition before the colon to be a javascript file and will try to require it. The part after the colon is expected to be a valid function identifier of that module. So, you have to export your hooks, using <a href="http://nodejs.org/docs/latest/api/modules.html#modules_modules"><code>module.exports</code></a> and register it in <code>ep.json</code> as <code>ep_&lt;plugin&gt;/path/to/&lt;file&gt;:FUNCTIONNAME</code>.
You can omit the <code>FUNCTIONNAME</code> part, if the exported function has got the same name as the hook. So <code>&quot;authorize&quot; : &quot;ep_flubberworm/foo&quot;</code> will call the function <code>exports.authorize</code> in <code>ep_flubberworm/foo.js</code>
</p>
<h3>Client hooks and server hooks<span><a class="mark" href="#plugins_client_hooks_and_server_hooks" id="plugins_client_hooks_and_server_hooks">#</a></span></h3>
<p>There are server hooks, which will be executed on the server (e.g. <code>expressCreateServer</code>), and there are client hooks, which are executed on the client (e.g. <code>acePopulateDomLine</code>). Be sure to not make assumptions about the environment your code is running in, e.g. don&apos;t try to access <code>process</code>, if you know your code will be run on the client, and likewise, don&apos;t try to access <code>window</code> on the server...
</p>
<h3>Parts<span><a class="mark" href="#plugins_parts" id="plugins_parts">#</a></span></h3>
<p>As your plugins become more and more complex, you will find yourself in the need to manage dependencies between plugins. E.g. you want the hooks of a certain plugin to be executed before (or after) yours. You can also manage these dependencies in your plugin definition file <code>ep.json</code>:
</p>
<pre><code class="javascript">{
&quot;parts&quot;: [
{
&quot;name&quot;: &quot;onepart&quot;,
&quot;pre&quot;: [],
&quot;post&quot;: [&quot;ep_onemoreplugin/partone&quot;]
&quot;hooks&quot;: {
&quot;storeBar&quot;: &quot;ep_monospace/plugin:storeBar&quot;,
&quot;getFoo&quot;: &quot;ep_monospace/plugin:getFoo&quot;,
}
},
{
&quot;name&quot;: &quot;otherpart&quot;,
&quot;pre&quot;: [&quot;ep_my_example/somepart&quot;, &quot;ep_otherplugin/main&quot;],
&quot;post&quot;: [],
&quot;hooks&quot;: {
&quot;someEvent&quot;: &quot;ep_my_example/otherpart:someEvent&quot;,
&quot;another&quot;: &quot;ep_my_example/otherpart:another&quot;
}
}
]
}</code></pre>
<p>Usually a plugin will add only one functionality at a time, so it will probably only use one <code>part</code> definition to register its hooks. However, sometimes you have to put different (unrelated) functionalities into one plugin. For this you will want use parts, so other plugins can depend on them.
</p>
<h4>pre/post<span><a class="mark" href="#plugins_pre_post" id="plugins_pre_post">#</a></span></h4>
<p>The <code>&quot;pre&quot;</code> and <code>&quot;post&quot;</code> definitions, affect the order in which parts of a plugin are executed. This ensures that plugins and their hooks are executed in the correct order.
</p>
<p><code>&quot;pre&quot;</code> lists parts that must be executed <em>before</em> the defining part. <code>&quot;post&quot;</code> lists parts that must be executed <em>after</em> the defining part.
</p>
<p>You can, on a basic level, think of this as double-ended dependency listing. If you have a dependency on another plugin, you can make sure it loads before yours by putting it in <code>&quot;pre&quot;</code>. If you are setting up things that might need to be used by a plugin later, you can ensure proper order by putting it in <code>&quot;post&quot;</code>.
</p>
<p>Note that it would be far more sane to use <code>&quot;pre&quot;</code> in almost any case, but if you want to change config variables for another plugin, or maybe modify its environment, <code>&quot;post&quot;</code> could definitely be useful.
</p>
<p>Also, note that dependencies should <em>also</em> be listed in your package.json, so they can be <code>npm install</code>&apos;d automagically when your plugin gets installed.
</p>
<h2>Package definition<span><a class="mark" href="#plugins_package_definition" id="plugins_package_definition">#</a></span></h2>
<p>Your plugin must also contain a <a href="http://npmjs.org/doc/json.html">package definition file</a>, called package.json, in the project root - this file contains various metadata relevant to your plugin, such as the name and version number, author, project hompage, contributors, a short description, etc. If you publish your plugin on npm, these metadata are used for package search etc., but it&apos;s necessary for Etherpad-lite plugins, even if you don&apos;t publish your plugin.
</p>
<pre><code class="json">{
&quot;name&quot;: &quot;ep_PLUGINNAME&quot;,
&quot;version&quot;: &quot;0.0.1&quot;,
&quot;description&quot;: &quot;DESCRIPTION&quot;,
&quot;author&quot;: &quot;USERNAME (REAL NAME) &lt;MAIL@EXAMPLE.COM&gt;&quot;,
&quot;contributors&quot;: [],
&quot;dependencies&quot;: {&quot;MODULE&quot;: &quot;0.3.20&quot;},
&quot;engines&quot;: { &quot;node&quot;: &quot;&gt;= 0.6.0&quot;}
}</code></pre>
<h2>Templates<span><a class="mark" href="#plugins_templates" id="plugins_templates">#</a></span></h2>
<p>If your plugin adds or modifies the front end HTML (e.g. adding buttons or changing their functions), you should put the necessary HTML code for such operations in <code>templates/</code>, in files of type &quot;.ejs&quot;, since Etherpad-Lite uses EJS for HTML templating. See the following link for more information about EJS: <a href="https://github.com/visionmedia/ejs">https://github.com/visionmedia/ejs</a>.
</p>
<h2>Writing and running front-end tests for your plugin<span><a class="mark" href="#plugins_writing_and_running_front_end_tests_for_your_plugin" id="plugins_writing_and_running_front_end_tests_for_your_plugin">#</a></span></h2>
<p>Etherpad allows you to easily create front-end tests for plugins.
</p>
<ol>
<li>Create a new folder<pre><code>%your_plugin%/static/tests/frontend/specs</code></pre>
</li>
<li><p>Put your spec file in here (Example spec files are visible in %etherpad_root_folder%/frontend/tests/specs)</p>
</li>
<li><p>Visit <a href="http://yourserver.com/frontend/tests">http://yourserver.com/frontend/tests</a> your front-end tests will run.</p>
</li>
</ol>
</div>
</body>
</html>

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "Llimpiar los colores d'autor\u00eda",
"pad.toolbar.import_export.title": "Importar\/Esportar ente distintos formatos de ficheru",
"pad.toolbar.timeslider.title": "Eslizador de tiempu",
"pad.toolbar.savedRevision.title": "Revisiones guardaes",
"pad.toolbar.savedRevision.title": "Guardar revisi\u00f3n",
"pad.toolbar.settings.title": "Configuraci\u00f3n",
"pad.toolbar.embed.title": "Incrustar esti bloc",
"pad.toolbar.showusers.title": "Amosar los usuarios d'esti bloc",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "Alderique en pantalla siempres",
"pad.settings.colorcheck": "Colores d'autor\u00eda",
"pad.settings.linenocheck": "N\u00famberos de llinia",
"pad.settings.rtlcheck": "\u00bfLleer el conten\u00edu de drecha a izquierda?",
"pad.settings.fontType": "Tipograf\u00eda:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monoespaciada",

View file

@ -0,0 +1,61 @@
{
"index.newPad": "\u0421\u0442\u0432\u0430\u0440\u044b\u0446\u044c",
"index.createOpenPad": "\u0446\u0456 \u0442\u0432\u0430\u0440\u044b\u0446\u044c\/\u0430\u0434\u043a\u0440\u044b\u0446\u044c \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442 \u0437 \u043d\u0430\u0437\u0432\u0430\u0439:",
"pad.toolbar.bold.title": "\u0422\u043e\u045e\u0441\u0442\u044b (Ctrl-B)",
"pad.toolbar.italic.title": "\u041a\u0443\u0440\u0441\u0456\u045e (Ctrl-I)",
"pad.toolbar.underline.title": "\u041f\u0430\u0434\u043a\u0440\u044d\u0441\u044c\u043b\u0456\u0432\u0430\u043d\u044c\u043d\u0435 (Ctrl-U)",
"pad.toolbar.strikethrough.title": "\u0417\u0430\u043a\u0440\u044d\u0441\u044c\u043b\u0456\u0432\u0430\u043d\u044c\u043d\u0435",
"pad.toolbar.ol.title": "\u0423\u043f\u0430\u0440\u0430\u0434\u043a\u0430\u0432\u0430\u043d\u044b \u0441\u044c\u043f\u0456\u0441",
"pad.toolbar.ul.title": "\u041d\u0435\u045e\u043f\u0430\u0440\u0430\u0434\u043a\u0430\u0432\u0430\u043d\u044b \u0441\u044c\u043f\u0456\u0441",
"pad.toolbar.indent.title": "\u0412\u043e\u0434\u0441\u0442\u0443\u043f",
"pad.toolbar.unindent.title": "\u0412\u044b\u0441\u0442\u0443\u043f",
"pad.toolbar.undo.title": "\u0421\u043a\u0430\u0441\u0430\u0432\u0430\u0446\u044c(Ctrl-Z)",
"pad.toolbar.redo.title": "\u0412\u044f\u0440\u043d\u0443\u0446\u044c (Ctrl-Y)",
"pad.toolbar.clearAuthorship.title": "\u041f\u0440\u044b\u0431\u0440\u0430\u0446\u044c \u043a\u043e\u043b\u0435\u0440 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0443",
"pad.toolbar.import_export.title": "\u0406\u043c\u043f\u0430\u0440\u0442\/\u042d\u043a\u0441\u043f\u0430\u0440\u0442 \u0437 \u0432\u044b\u043a\u0430\u0440\u044b\u0441\u0442\u0430\u043d\u044c\u043d\u0435 \u0440\u043e\u0437\u043d\u044b\u0445 \u0444\u0430\u0440\u043c\u0430\u0442\u0430\u045e \u0444\u0430\u0439\u043b\u0430\u045e",
"pad.toolbar.timeslider.title": "\u0428\u043a\u0430\u043b\u0430 \u0447\u0430\u0441\u0443",
"pad.toolbar.savedRevision.title": "\u0417\u0430\u0445\u0430\u0432\u0430\u0446\u044c \u0432\u044d\u0440\u0441\u0456\u044e",
"pad.toolbar.settings.title": "\u041d\u0430\u043b\u0430\u0434\u044b",
"pad.toolbar.embed.title": "\u0423\u0431\u0443\u0434\u0430\u0432\u0430\u0446\u044c \u0433\u044d\u0442\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442",
"pad.toolbar.showusers.title": "\u041f\u0430\u043a\u0430\u0437\u0430\u0446\u044c \u043a\u0430\u0440\u044b\u0441\u0442\u0430\u043b\u044c\u043d\u0456\u043a\u0430\u045e \u0443 \u0433\u044d\u0442\u044b\u043c \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0446\u0435",
"pad.colorpicker.save": "\u0417\u0430\u0445\u0430\u0432\u0430\u0446\u044c",
"pad.colorpicker.cancel": "\u0421\u043a\u0430\u0441\u0430\u0432\u0430\u0446\u044c",
"pad.loading": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",
"pad.passwordRequired": "\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0443 \u0434\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430 \u043f\u0430\u0442\u0440\u044d\u0431\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044c",
"pad.permissionDenied": "\u0412\u044b \u043d\u044f \u043c\u0430\u0435\u0446\u0435 \u0434\u0430\u0437\u0432\u043e\u043b\u0443 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u0430 \u0433\u044d\u0442\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430",
"pad.wrongPassword": "\u0412\u044b \u045e\u0432\u044f\u043b\u0456 \u043d\u044f\u0441\u043b\u0443\u0448\u043d\u044b \u043f\u0430\u0440\u043e\u043b\u044c",
"pad.settings.padSettings": "\u041d\u0430\u043b\u0430\u0434\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430",
"pad.settings.myView": "\u041c\u043e\u0439 \u0432\u044b\u0433\u043b\u044f\u0434",
"pad.settings.stickychat": "\u0417\u0430\u045e\u0441\u0451\u0434\u044b \u043f\u0430\u043a\u0430\u0437\u0432\u0430\u0446\u044c \u0447\u0430\u0442",
"pad.settings.colorcheck": "\u041a\u043e\u043b\u0435\u0440\u044b \u0430\u045e\u0442\u0430\u0440\u0441\u0442\u0432\u0430",
"pad.settings.linenocheck": "\u041d\u0443\u043c\u0430\u0440\u044b \u0440\u0430\u0434\u043a\u043e\u045e",
"pad.settings.rtlcheck": "\u0422\u044d\u043a\u0441\u0442 \u0441\u043f\u0440\u0430\u0432\u0430-\u043d\u0430\u043b\u0435\u0432\u0430",
"pad.settings.fontType": "\u0422\u044b\u043f \u0448\u0440\u044b\u0444\u0442\u0443:",
"pad.settings.fontType.normal": "\u0417\u0432\u044b\u0447\u0430\u0439\u043d\u044b",
"pad.settings.fontType.monospaced": "\u041c\u043e\u043d\u0430\u0448\u044b\u0440\u044b\u043d\u043d\u044b",
"pad.settings.globalView": "\u0410\u0433\u0443\u043b\u044c\u043d\u044b \u0432\u044b\u0433\u043b\u044f\u0434",
"pad.settings.language": "\u041c\u043e\u0432\u0430:",
"pad.importExport.import_export": "\u0406\u043c\u043f\u0430\u0440\u0442\/\u042d\u043a\u0441\u043f\u0430\u0440\u0442",
"pad.importExport.import": "\u0417\u0430\u0433\u0440\u0443\u0437\u0456\u0436\u0430\u0439\u0446\u0435 \u043b\u044e\u0431\u044b\u044f \u0442\u044d\u043a\u0441\u0442\u0430\u0432\u044b\u044f \u0444\u0430\u0439\u043b\u044b \u0430\u0431\u043e \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u044b",
"pad.importExport.importSuccessful": "\u041f\u0430\u0441\u044c\u043f\u044f\u0445\u043e\u0432\u0430!",
"pad.importExport.export": "\u042d\u043a\u0441\u043f\u0430\u0440\u0442\u0430\u0432\u0430\u0446\u044c \u0431\u044f\u0433\u0443\u0447\u044b \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442 \u044f\u043a:",
"pad.importExport.exporthtml": "HTML",
"pad.importExport.exportplain": "\u041f\u0440\u043e\u0441\u0442\u044b \u0442\u044d\u043a\u0441\u0442",
"pad.importExport.exportword": "Microsoft Word",
"pad.importExport.exportpdf": "PDF",
"pad.importExport.exportopen": "ODF (Open Document Format)",
"pad.importExport.exportdokuwiki": "DokuWiki",
"pad.modals.connected": "\u041f\u0430\u0434\u043b\u0443\u0447\u044b\u043b\u0456\u0441\u044f.",
"pad.modals.reconnecting": "\u041f\u0435\u0440\u0430\u043f\u0430\u0434\u043b\u0443\u0447\u044d\u043d\u044c\u043d\u0435 \u0434\u0430 \u0432\u0430\u0448\u0430\u0433\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430...",
"pad.modals.forcereconnect": "\u041f\u0440\u044b\u043c\u0443\u0441\u043e\u0432\u0430\u0435 \u043f\u0435\u0440\u0430\u043f\u0430\u0434\u043b\u0443\u0447\u044d\u043d\u044c\u043d\u0435",
"pad.share": "\u041f\u0430\u0434\u0437\u044f\u043b\u0456\u0446\u0446\u0430 \u0434\u0430\u043a\u0443\u043c\u044d\u043d\u0442\u0430\u043c",
"pad.share.readonly": "\u0422\u043e\u043b\u044c\u043a\u0456 \u0434\u043b\u044f \u0447\u044b\u0442\u0430\u043d\u044c\u043d\u044f",
"pad.share.link": "\u0421\u043f\u0430\u0441\u044b\u043b\u043a\u0430",
"pad.chat": "\u0427\u0430\u0442",
"@metadata": {
"authors": [
"Jim-by",
"Wizardist"
]
}
}

View file

@ -37,6 +37,7 @@
"pad.settings.stickychat": "Diskwel ar flap bepred",
"pad.settings.colorcheck": "Livio\u00f9 anaout",
"pad.settings.linenocheck": "Niverenno\u00f9 linenno\u00f9",
"pad.settings.rtlcheck": "Lenn an danvez a-zehou da gleiz ?",
"pad.settings.fontType": "Seurt font :",
"pad.settings.fontType.normal": "Reizh",
"pad.settings.fontType.monospaced": "Monospas",

View file

@ -28,6 +28,7 @@
"pad.settings.stickychat": "Xateja sempre a la pantalla",
"pad.settings.colorcheck": "Colors d'autoria",
"pad.settings.linenocheck": "N\u00fameros de l\u00ednia",
"pad.settings.rtlcheck": "Llegir el contingut de dreta a esquerra?",
"pad.settings.fontType": "Tipus de lletra:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "D'amplada fixa",

View file

@ -1,9 +1,10 @@
{
"@metadata": {
"authors": [
"Christian List",
"Peter Alberti"
]
"authors": {
"0": "Christian List",
"1": "Peter Alberti",
"3": "Steenth"
}
},
"index.newPad": "Ny Pad",
"index.createOpenPad": "eller opret\/\u00e5bn en Pad med navnet:",
@ -20,7 +21,7 @@
"pad.toolbar.clearAuthorship.title": "Fjern farver for forfatterskab",
"pad.toolbar.import_export.title": "Import\/eksport fra\/til forskellige filformater",
"pad.toolbar.timeslider.title": "Timeslider",
"pad.toolbar.savedRevision.title": "Gemte revisioner",
"pad.toolbar.savedRevision.title": "Gem Revision",
"pad.toolbar.settings.title": "Indstillinger",
"pad.toolbar.embed.title": "Integrer denne pad",
"pad.toolbar.showusers.title": "Vis brugere p\u00e5 denne pad",
@ -35,6 +36,7 @@
"pad.settings.stickychat": "Chat altid p\u00e5 sk\u00e6rmen",
"pad.settings.colorcheck": "Forfatterskabsfarver",
"pad.settings.linenocheck": "Linjenumre",
"pad.settings.rtlcheck": "L\u00e6se indhold fra h\u00f8jre mod venstre?",
"pad.settings.fontType": "Skrifttype:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Fastbredde",

View file

@ -37,6 +37,7 @@
"pad.settings.stickychat": "Chat immer anzeigen",
"pad.settings.colorcheck": "Autorenfarben anzeigen",
"pad.settings.linenocheck": "Zeilennummern",
"pad.settings.rtlcheck": "Inhalt von rechts nach links lesen?",
"pad.settings.fontType": "Schriftart:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospace",

View file

@ -21,7 +21,7 @@
"pad.toolbar.clearAuthorship.title": "\u067e\u0627\u06a9 \u06a9\u0631\u062f\u0646 \u0631\u0646\u06af\u200c\u0647\u0627\u06cc \u0646\u0648\u06cc\u0633\u0646\u062f\u06af\u06cc",
"pad.toolbar.import_export.title": "\u062f\u0631\u0648\u0646\u200c\u0631\u06cc\u0632\u06cc\/\u0628\u0631\u0648\u0646\u200c\u0631\u06cc\u0632\u06cc \u0627\u0632\/\u0628\u0647 \u0642\u0627\u0644\u0628\u200c\u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641",
"pad.toolbar.timeslider.title": "\u0627\u0633\u0644\u0627\u06cc\u062f\u0631 \u0632\u0645\u0627\u0646",
"pad.toolbar.savedRevision.title": "\u0630\u062e\u06cc\u0631\u0647\u200c\u0633\u0627\u0632\u06cc \u0646\u0633\u062e\u0647",
"pad.toolbar.savedRevision.title": "\u0630\u062e\u06cc\u0631\u0647\u200c\u06cc \u0628\u0627\u0632\u0646\u0648\u06cc\u0633\u06cc",
"pad.toolbar.settings.title": "\u062a\u0646\u0638\u06cc\u0645\u0627\u062a",
"pad.toolbar.embed.title": "\u062c\u0627\u0633\u0627\u0632\u06cc \u0627\u06cc\u0646 \u062f\u0641\u062a\u0631\u0686\u0647 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a",
"pad.toolbar.showusers.title": "\u0646\u0645\u0627\u06cc\u0634 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u062f\u0631 \u0627\u06cc\u0646 \u062f\u0641\u062a\u0631\u0686\u0647 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a",

View file

@ -28,7 +28,7 @@
"pad.toolbar.clearAuthorship.title": "Effacer les couleurs identifiant les auteurs",
"pad.toolbar.import_export.title": "Importer\/Exporter de\/vers un format de fichier diff\u00e9rent",
"pad.toolbar.timeslider.title": "Historique dynamique",
"pad.toolbar.savedRevision.title": "Versions enregistr\u00e9es",
"pad.toolbar.savedRevision.title": "Enregistrer la r\u00e9vision",
"pad.toolbar.settings.title": "Param\u00e8tres",
"pad.toolbar.embed.title": "Int\u00e9grer ce Pad",
"pad.toolbar.showusers.title": "Afficher les utilisateurs du Pad",
@ -43,6 +43,7 @@
"pad.settings.stickychat": "Toujours afficher le chat",
"pad.settings.colorcheck": "Couleurs d\u2019identification",
"pad.settings.linenocheck": "Num\u00e9ros de lignes",
"pad.settings.rtlcheck": "Lire le contenu de la droite vers la gauche?",
"pad.settings.fontType": "Type de police :",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospace",

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "Limpar as cores de identificaci\u00f3n dos autores",
"pad.toolbar.import_export.title": "Importar\/Exportar desde\/a diferentes formatos de ficheiro",
"pad.toolbar.timeslider.title": "Li\u00f1a do tempo",
"pad.toolbar.savedRevision.title": "Revisi\u00f3ns gardadas",
"pad.toolbar.savedRevision.title": "Gardar a revisi\u00f3n",
"pad.toolbar.settings.title": "Configuraci\u00f3ns",
"pad.toolbar.embed.title": "Incorporar este documento",
"pad.toolbar.showusers.title": "Mostrar os usuarios deste documento",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "Chat sempre visible",
"pad.settings.colorcheck": "Cores de identificaci\u00f3n",
"pad.settings.linenocheck": "N\u00fameros de li\u00f1a",
"pad.settings.rtlcheck": "Quere ler o contido da dereita \u00e1 esquerda?",
"pad.settings.fontType": "Tipo de letra:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monoespazada",

View file

@ -20,7 +20,7 @@
"pad.toolbar.clearAuthorship.title": "\u05e0\u05d9\u05e7\u05d5\u05d9 \u05e6\u05d1\u05e2\u05d9\u05dd",
"pad.toolbar.import_export.title": "\u05d9\u05d9\u05d1\u05d5\u05d0\/\u05d9\u05d9\u05e6\u05d0 \u05d1\u05ea\u05e1\u05d3\u05d9\u05e8\u05d9 \u05e7\u05d1\u05e6\u05d9\u05dd \u05e9\u05d5\u05e0\u05d9\u05dd",
"pad.toolbar.timeslider.title": "\u05d2\u05d5\u05dc\u05dc \u05d6\u05de\u05df",
"pad.toolbar.savedRevision.title": "\u05d2\u05e8\u05e1\u05d0\u05d5\u05ea \u05e9\u05de\u05d5\u05e8\u05d5\u05ea",
"pad.toolbar.savedRevision.title": "\u05e9\u05de\u05d9\u05e8\u05ea \u05d2\u05e8\u05e1\u05d4",
"pad.toolbar.settings.title": "\u05d4\u05d2\u05d3\u05e8\u05d5\u05ea",
"pad.toolbar.embed.title": "\u05d4\u05d8\u05de\u05e2\u05ea \u05d4\u05e4\u05e0\u05e7\u05e1 \u05d4\u05d6\u05d4",
"pad.toolbar.showusers.title": "\u05d4\u05e6\u05d2\u05ea \u05d4\u05de\u05e9\u05ea\u05de\u05e9\u05d9\u05dd \u05d1\u05e4\u05e0\u05e7\u05e1 \u05d4\u05d6\u05d4",
@ -35,6 +35,7 @@
"pad.settings.stickychat": "\u05d4\u05e9\u05d9\u05d7\u05d4 \u05ea\u05de\u05d9\u05d3 \u05e2\u05dc \u05d4\u05de\u05e1\u05da",
"pad.settings.colorcheck": "\u05e6\u05d1\u05d9\u05e2\u05d4 \u05dc\u05e4\u05d9 \u05de\u05d7\u05d1\u05e8",
"pad.settings.linenocheck": "\u05de\u05e1\u05e4\u05e8\u05d9 \u05e9\u05d5\u05e8\u05d5\u05ea",
"pad.settings.rtlcheck": "\u05dc\u05e7\u05e8\u05d5\u05d0 \u05d0\u05ea \u05d4\u05ea\u05d5\u05db\u05df \u05de\u05d9\u05de\u05d9\u05df \u05dc\u05e9\u05de\u05d0\u05dc?",
"pad.settings.fontType": "\u05e1\u05d5\u05d2 \u05d2\u05d5\u05e4\u05df:",
"pad.settings.fontType.normal": "\u05e8\u05d2\u05d9\u05dc",
"pad.settings.fontType.monospaced": "\u05d1\u05e8\u05d5\u05d7\u05d1 \u05e7\u05d1\u05d5\u05e2",

View file

@ -34,6 +34,7 @@
"pad.settings.stickychat": "Chat sempre visibile",
"pad.settings.colorcheck": "Colores de autor",
"pad.settings.linenocheck": "Numeros de linea",
"pad.settings.rtlcheck": "Leger le contento de dextra a sinistra?",
"pad.settings.fontType": "Typo de litteras:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospatial",

View file

@ -22,7 +22,7 @@
"pad.toolbar.clearAuthorship.title": "Elimina i colori che indicano gli autori",
"pad.toolbar.import_export.title": "Importa\/esporta da\/a diversi formati di file",
"pad.toolbar.timeslider.title": "Presentazione cronologia",
"pad.toolbar.savedRevision.title": "Revisioni salvate",
"pad.toolbar.savedRevision.title": "Versione salvata",
"pad.toolbar.settings.title": "Impostazioni",
"pad.toolbar.embed.title": "Incorpora questo Pad",
"pad.toolbar.showusers.title": "Visualizza gli utenti su questo Pad",
@ -37,6 +37,7 @@
"pad.settings.stickychat": "Chat sempre sullo schermo",
"pad.settings.colorcheck": "Colori che indicano gli autori",
"pad.settings.linenocheck": "Numeri di riga",
"pad.settings.rtlcheck": "Leggere il contenuto da destra a sinistra?",
"pad.settings.fontType": "Tipo di carattere:",
"pad.settings.fontType.normal": "Normale",
"pad.settings.fontType.monospaced": "A larghezza fissa",

View file

@ -34,6 +34,7 @@
"pad.settings.stickychat": "\u753b\u9762\u306b\u30c1\u30e3\u30c3\u30c8\u3092\u5e38\u306b\u8868\u793a",
"pad.settings.colorcheck": "\u4f5c\u8005\u306e\u8272\u5206\u3051",
"pad.settings.linenocheck": "\u884c\u756a\u53f7",
"pad.settings.rtlcheck": "\u53f3\u6a2a\u66f8\u304d\u306b\u3059\u308b",
"pad.settings.fontType": "\u30d5\u30a9\u30f3\u30c8\u306e\u7a2e\u985e:",
"pad.settings.fontType.normal": "\u901a\u5e38",
"pad.settings.fontType.monospaced": "\u56fa\u5b9a\u5e45",

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "\uc800\uc790\uc758 \uc0c9 \uc9c0\uc6b0\uae30",
"pad.toolbar.import_export.title": "\ub2e4\ub978 \ud30c\uc77c \ud615\uc2dd\uc73c\ub85c \uac00\uc838\uc624\uae30\/\ub0b4\ubcf4\ub0b4\uae30",
"pad.toolbar.timeslider.title": "\uc2dc\uac04\uc2ac\ub77c\uc774\ub354",
"pad.toolbar.savedRevision.title": "\uc800\uc7a5\ud55c \ud310",
"pad.toolbar.savedRevision.title": "\ud310 \uc800\uc7a5",
"pad.toolbar.settings.title": "\uc124\uc815",
"pad.toolbar.embed.title": "\uc774 \ud328\ub4dc \ud3ec\ud568\ud558\uae30",
"pad.toolbar.showusers.title": "\uc774 \ud328\ub4dc\uc5d0 \uc0ac\uc6a9\uc790 \ubcf4\uae30",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "\ud654\uba74\uc5d0 \ud56d\uc0c1 \ub300\ud654 \ubcf4\uae30",
"pad.settings.colorcheck": "\uc800\uc790 \uc0c9",
"pad.settings.linenocheck": "\uc904 \ubc88\ud638",
"pad.settings.rtlcheck": "\uc6b0\ud6a1\uc11c(\uc624\ub978\ucabd\uc5d0\uc11c \uc67c\ucabd\uc73c\ub85c)\uc785\ub2c8\uae4c?",
"pad.settings.fontType": "\uae00\uaf34 \uc885\ub958:",
"pad.settings.fontType.normal": "\ubcf4\ud1b5",
"pad.settings.fontType.monospaced": "\uace0\uc815 \ud3ed",

View file

@ -20,7 +20,7 @@
"pad.toolbar.clearAuthorship.title": "\u041f\u043e\u043d\u0438\u0448\u0442\u0438 \u0433\u0438 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0442\u0435 \u0431\u043e\u0438",
"pad.toolbar.import_export.title": "\u0423\u0432\u043e\u0437\/\u0418\u0437\u0432\u043e\u0437 \u043e\u0434\/\u0432\u043e \u0440\u0430\u0437\u043d\u0438 \u043f\u043e\u0434\u0430\u0442\u043e\u0442\u0435\u0447\u043d\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438",
"pad.toolbar.timeslider.title": "\u0418\u0441\u0442\u043e\u0440\u0438\u0441\u043a\u0438 \u043f\u0440\u0435\u0433\u043b\u0435\u0434",
"pad.toolbar.savedRevision.title": "\u0417\u0430\u0447\u0443\u0432\u0430\u043d\u0438 \u0440\u0435\u0432\u0438\u0437\u0438\u0438",
"pad.toolbar.savedRevision.title": "\u0417\u0430\u0447\u0443\u0432\u0430\u0458 \u0440\u0435\u0432\u0438\u0437\u0438\u0458\u0430",
"pad.toolbar.settings.title": "\u041f\u043e\u0441\u0442\u0430\u0432\u043a\u0438",
"pad.toolbar.embed.title": "\u0412\u043c\u0435\u0442\u043d\u0438 \u0458\u0430 \u0442\u0435\u0442\u0440\u0430\u0442\u043a\u0430\u0432\u0430",
"pad.toolbar.showusers.title": "\u041f\u0440\u0438\u043a\u0430\u0436. \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0446\u0438\u0442\u0435 \u043d\u0430 \u0442\u0435\u0442\u0440\u0430\u0442\u043a\u0430\u0432\u0430",
@ -35,6 +35,7 @@
"pad.settings.stickychat": "\u0420\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435 \u0441\u0435\u043a\u043e\u0433\u0430\u0448 \u043d\u0430 \u0435\u043a\u0440\u0430\u043d\u043e\u0442",
"pad.settings.colorcheck": "\u0410\u0432\u0442\u043e\u0440\u0441\u043a\u0438 \u0431\u043e\u0438",
"pad.settings.linenocheck": "\u0411\u0440\u043e\u0435\u0432\u0438 \u043d\u0430 \u0440\u0435\u0434\u043e\u0432\u0438\u0442\u0435",
"pad.settings.rtlcheck": "\u0421\u043e\u0434\u0440\u0436\u0438\u043d\u0438\u0442\u0435 \u0434\u0430 \u0441\u0435 \u0447\u0438\u0442\u0430\u0430\u0442 \u043e\u0434 \u0434\u0435\u0441\u043d\u043e \u043d\u0430 \u043b\u0435\u0432\u043e?",
"pad.settings.fontType": "\u0422\u0438\u043f \u043d\u0430 \u0444\u043e\u043d\u0442:",
"pad.settings.fontType.normal": "\u041d\u043e\u0440\u043c\u0430\u043b\u0435\u043d",
"pad.settings.fontType.monospaced": "\u041d\u0435\u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u0435\u043d",

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "Padamkan Warna Pengarang",
"pad.toolbar.import_export.title": "Import\/Eksport dari\/ke format-format fail berbeza",
"pad.toolbar.timeslider.title": "Gelangsar masa",
"pad.toolbar.savedRevision.title": "Semakan Tersimpan",
"pad.toolbar.savedRevision.title": "Simpan Semakan",
"pad.toolbar.settings.title": "Tetapan",
"pad.toolbar.embed.title": "Benamkan pad ini",
"pad.toolbar.showusers.title": "Tunjukkan pengguna pada pad ini",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "Sentiasa bersembang pada skrin",
"pad.settings.colorcheck": "Warna pengarang",
"pad.settings.linenocheck": "Nombor baris",
"pad.settings.rtlcheck": "Membaca dari kanan ke kiri?",
"pad.settings.fontType": "Jenis fon:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospace",

View file

@ -34,6 +34,7 @@
"pad.settings.stickychat": "Chat altijd zichtbaar",
"pad.settings.colorcheck": "Kleuren auteurs",
"pad.settings.linenocheck": "Regelnummers",
"pad.settings.rtlcheck": "Inhoud van rechts naar links lezen?",
"pad.settings.fontType": "Lettertype:",
"pad.settings.fontType.normal": "Normaal",
"pad.settings.fontType.monospaced": "Monospace",

View file

@ -22,7 +22,7 @@
"pad.toolbar.clearAuthorship.title": "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
"pad.toolbar.import_export.title": "\u0418\u043c\u043f\u043e\u0440\u0442\/\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432",
"pad.toolbar.timeslider.title": "\u0428\u043a\u0430\u043b\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438",
"pad.toolbar.savedRevision.title": "\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438",
"pad.toolbar.savedRevision.title": "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e",
"pad.toolbar.settings.title": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",
"pad.toolbar.embed.title": "\u0412\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442",
"pad.toolbar.showusers.title": "\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435",
@ -37,6 +37,7 @@
"pad.settings.stickychat": "\u0412\u0441\u0435\u0433\u0434\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0447\u0430\u0442",
"pad.settings.colorcheck": "\u0426\u0432\u0435\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
"pad.settings.linenocheck": "\u041d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a",
"pad.settings.rtlcheck": "\u0427\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e?",
"pad.settings.fontType": "\u0422\u0438\u043f \u0448\u0440\u0438\u0444\u0442\u0430:",
"pad.settings.fontType.normal": "\u041e\u0431\u044b\u0447\u043d\u044b\u0439",
"pad.settings.fontType.monospaced": "\u041c\u043e\u043d\u043e\u0448\u0438\u0440\u0438\u043d\u043d\u044b\u0439",

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "Po\u010disti barvo avtorstva",
"pad.toolbar.import_export.title": "Izvozi\/Uvozi razli\u010dne oblike zapisov",
"pad.toolbar.timeslider.title": "Drsnik zgodovine",
"pad.toolbar.savedRevision.title": "Shranjene predelave",
"pad.toolbar.savedRevision.title": "Shrani predelavo",
"pad.toolbar.settings.title": "Nastavitve",
"pad.toolbar.embed.title": "Vstavi dokument",
"pad.toolbar.showusers.title": "Poka\u017ei uporabnike dokumenta",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "Vsebina klepeta je vedno na zaslonu.",
"pad.settings.colorcheck": "Barve avtorstva",
"pad.settings.linenocheck": "\u0160tevilke vrstic",
"pad.settings.rtlcheck": "Ali naj se vsebina prebira od desne proti levi?",
"pad.settings.fontType": "Vrsta pisave:",
"pad.settings.fontType.normal": "Obi\u010dajno",
"pad.settings.fontType.monospaced": "Monospace",

View file

@ -19,7 +19,7 @@
"pad.toolbar.clearAuthorship.title": "Rensa f\u00f6rfattarf\u00e4rger",
"pad.toolbar.import_export.title": "Importera\/exportera fr\u00e5n\/till olika filformat",
"pad.toolbar.timeslider.title": "Tidsreglage",
"pad.toolbar.savedRevision.title": "Sparade revisioner",
"pad.toolbar.savedRevision.title": "Spara revision",
"pad.toolbar.settings.title": "Inst\u00e4llningar",
"pad.toolbar.embed.title": "B\u00e4dda in detta block",
"pad.toolbar.showusers.title": "Visa anv\u00e4ndarna p\u00e5 detta block",
@ -34,6 +34,7 @@
"pad.settings.stickychat": "Chatten alltid p\u00e5 sk\u00e4rmen",
"pad.settings.colorcheck": "F\u00f6rfattarskapsf\u00e4rger",
"pad.settings.linenocheck": "Radnummer",
"pad.settings.rtlcheck": "Vill du l\u00e4sa inneh\u00e5llet fr\u00e5n h\u00f6ger till v\u00e4nster?",
"pad.settings.fontType": "Typsnitt:",
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Fast breddsteg",

View file

@ -26,7 +26,7 @@
"pad.colorpicker.save": "\u0c2d\u0c26\u0c4d\u0c30\u0c2a\u0c30\u0c1a\u0c41",
"pad.colorpicker.cancel": "\u0c30\u0c26\u0c4d\u0c26\u0c41\u0c1a\u0c47\u0c2f\u0c3f",
"pad.loading": "\u0c32\u0c4b\u0c21\u0c35\u0c41\u0c24\u0c4b\u0c02\u0c26\u0c3f...",
"pad.wrongPassword": "\u0c2e\u0c40 \u0c30\u0c39\u0c38\u0c4d\u0c2f\u0c2a\u0c26\u0c02 \u0c24\u0c2a\u0c41",
"pad.wrongPassword": "\u0c2e\u0c40 \u0c38\u0c02\u0c15\u0c47\u0c24\u0c2a\u0c26\u0c02 \u0c24\u0c2a\u0c4d\u0c2a\u0c41",
"pad.settings.padSettings": "\u0c2a\u0c32\u0c15 \u0c05\u0c2e\u0c30\u0c3f\u0c15\u0c32\u0c41",
"pad.settings.myView": "\u0c28\u0c3e \u0c09\u0c26\u0c4d\u0c26\u0c47\u0c36\u0c4d\u0c2f\u0c2e\u0c41",
"pad.settings.stickychat": "\u0c24\u0c46\u0c30\u0c2a\u0c48\u0c28\u0c47 \u0c2e\u0c3e\u0c1f\u0c3e\u0c2e\u0c02\u0c24\u0c3f\u0c28\u0c3f \u0c0e\u0c32\u0c4d\u0c32\u0c2a\u0c41\u0c21\u0c41 \u0c1a\u0c47\u0c2f\u0c41\u0c2e\u0c41",

View file

@ -35,6 +35,7 @@
"pad.settings.stickychat": "\u6c38\u9060\u5728\u5c4f\u5e55\u4e0a\u986f\u793a\u804a\u5929",
"pad.settings.colorcheck": "\u4f5c\u8005\u984f\u8272",
"pad.settings.linenocheck": "\u884c\u865f",
"pad.settings.rtlcheck": "\u5f9e\u53f3\u81f3\u5de6\u8b80\u53d6\u5167\u5bb9\uff1f",
"pad.settings.fontType": "\u5b57\u9ad4\u985e\u578b\uff1a",
"pad.settings.fontType.normal": "\u6b63\u5e38",
"pad.settings.fontType.monospaced": "\u7b49\u5bec",

View file

@ -60,7 +60,7 @@ exports.doImport = function(req, res, padId)
form.parse(req, function(err, fields, files) {
//the upload failed, stop at this point
if(err || files.file === undefined) {
console.warn("Uploading Error: " + err.stack);
if(err) console.warn("Uploading Error: " + err.stack);
callback("uploadFailed");
}
//everything ok, continue

View file

@ -551,10 +551,19 @@ function handleUserChanges(client, message)
}
});
// Validate all 'author' attribs to be the same value as the current user
wireApool.eachAttrib(function(type, value) {
if('author' == type && value != thisSession.author) throw "Trying to submit changes as another author"
})
// Validate all added 'author' attribs to be the same value as the current user
var iterator = Changeset.opIterator(Changeset.unpack(changeset).ops)
, op
while(iterator.hasNext()) {
op = iterator.next()
if(op.opcode != '+') continue;
op.attribs.split('*').forEach(function(attr) {
if(!attr) return
attr = wireApool.getAttrib(attr)
if(!attr) return
if('author' == attr[0] && attr[1] != thisSession.author) throw "Trying to submit changes as another author"
})
}
}
catch(e)
{

View file

@ -354,7 +354,6 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// Let's put this under /rest for now
var subpath = express();
args.app.use(express.bodyParser());
args.app.use(basePath, subpath);
swagger.setAppHandler(subpath);

View file

@ -94,7 +94,7 @@ exports.expressConfigure = function (hook_name, args, cb) {
// If the log level specified in the config file is WARN or ERROR the application server never starts listening to requests as reported in issue #158.
// Not installing the log4js connect logger when the log level has a higher severity than INFO since it would not log at that level anyway.
if (!(settings.loglevel === "WARN" || settings.loglevel == "ERROR"))
args.app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.INFO, format: ':status, :method :url'}));
args.app.use(log4js.connectLogger(httpLogger, { level: log4js.levels.DEBUG, format: ':status, :method :url -- :response-timems'}));
/* Do not let express create the session, so that we can retain a
* reference to it for socket.io to use. Also, set the key (cookie

View file

@ -16,7 +16,7 @@
"require-kernel" : "1.0.5",
"resolve" : "0.2.x",
"socket.io" : "0.9.x",
"ueberDB" : "0.1.94",
"ueberDB" : "0.1.95",
"async" : "0.1.x",
"express" : "3.x",
"connect" : "2.4.x",
@ -24,6 +24,7 @@
"uglify-js" : "1.2.5",
"formidable" : "1.0.9",
"log4js" : "0.5.x",
"nodemailer" : "0.3.x",
"jsdom-nocontextifiy" : "0.2.10",
"async-stacktrace" : "0.0.2",
"npm" : "1.1.x",
@ -46,5 +47,5 @@
"engines" : { "node" : ">=0.6.3",
"npm" : ">=1.0"
},
"version" : "1.2.81"
"version" : "1.2.9"
}

View file

@ -5125,7 +5125,7 @@ function Ace2Inner(){
function initLineNumbers()
{
lineNumbersShown = 1;
sideDiv.innerHTML = '<table border="0" cellpadding="0" cellspacing="0" align="right">' + '<tr><td id="sidedivinner"><div>1</div></td></tr></table>';
sideDiv.innerHTML = '<table border="0" cellpadding="0" cellspacing="0" align="right"><tr><td id="sidedivinner"><div>1</div></td></tr></table>';
sideDivInner = outerWin.document.getElementById("sidedivinner");
}

View file

@ -17,6 +17,7 @@
var padutils = require('./pad_utils').padutils;
var padcookie = require('./pad_cookie').padcookie;
var Tinycon = require('tinycon/tinycon');
var hooks = require('./pluginfw/hooks');
var chat = (function()
{
@ -77,7 +78,7 @@ var chat = (function()
$("#chatinput").val("");
},
addMessage: function(msg, increment, isHistoryAdd)
{
{
//correct the time
msg.time += this._pad.clientTimeOffset;
@ -99,73 +100,68 @@ var chat = (function()
var text = padutils.escapeHtmlWithClickableLinks(msg.text, "_blank");
/* Performs an action if your name is mentioned */
var myName = $('#myusernameedit').val();
myName = myName.toLowerCase();
var chatText = text.toLowerCase();
var wasMentioned = false;
if (chatText.indexOf(myName) !== -1 && myName != "undefined"){
wasMentioned = true;
var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName);
// the hook args
var ctx = {
"authorName" : authorName,
"author" : msg.userId,
"text" : text,
"sticky" : false,
"timestamp" : msg.time,
"timeStr" : timeStr
}
/* End of new action */
var authorName = msg.userName == null ? _('pad.userlist.unnamed') : padutils.escapeHtml(msg.userName);
var html = "<p data-authorId='" + msg.userId + "' class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + timeStr + "</span> " + text + "</p>";
if(isHistoryAdd)
$(html).insertAfter('#chatloadmessagesbutton');
else
$("#chattext").append(html);
//should we increment the counter??
if(increment && !isHistoryAdd)
{
var count = Number($("#chatcounter").text());
count++;
// is the users focus already in the chatbox?
var alreadyFocused = $("#chatinput").is(":focus");
// does the user already have the chatbox open?
var chatOpen = $("#chatbox").is(":visible");
// is the users focus already in the chatbox?
var alreadyFocused = $("#chatinput").is(":focus");
$("#chatcounter").text(count);
// chat throb stuff -- Just make it throw for twice as long
if(wasMentioned && !alreadyFocused && !isHistoryAdd && !chatOpen)
{ // If the user was mentioned show for twice as long and flash the browser window
$.gritter.add({
// (string | mandatory) the heading of the notification
title: authorName,
// (string | mandatory) the text inside the notification
text: text,
// (bool | optional) if you want it to fade out on its own or just sit there
sticky: true,
// (int | optional) the time you want it to be alive for before fading out
time: '2000'
});
// does the user already have the chatbox open?
var chatOpen = $("#chatbox").is(":visible");
chatMentions++;
Tinycon.setBubble(chatMentions);
}
// does this message contain this user's name? (is the curretn user mentioned?)
var myName = $('#myusernameedit').val();
var wasMentioned = (text.toLowerCase().indexOf(myName.toLowerCase()) !== -1 && myName != "undefined");
if(wasMentioned && !alreadyFocused && !isHistoryAdd && !chatOpen)
{ // If the user was mentioned show for twice as long and flash the browser window
chatMentions++;
Tinycon.setBubble(chatMentions);
ctx.sticky = true;
}
// Call chat message hook
hooks.aCallAll("chatNewMessage", ctx, function() {
var html = "<p data-authorId='" + msg.userId + "' class='" + authorClass + "'><b>" + authorName + ":</b><span class='time " + authorClass + "'>" + ctx.timeStr + "</span> " + ctx.text + "</p>";
if(isHistoryAdd)
$(html).insertAfter('#chatloadmessagesbutton');
else
$("#chattext").append(html);
//should we increment the counter??
if(increment && !isHistoryAdd)
{
if(!chatOpen){
// Update the counter of unread messages
var count = Number($("#chatcounter").text());
count++;
$("#chatcounter").text(count);
if(!chatOpen) {
$.gritter.add({
// (string | mandatory) the heading of the notification
title: authorName,
title: ctx.authorName,
// (string | mandatory) the text inside the notification
text: text,
text: ctx.text,
// (bool | optional) if you want it to fade out on its own or just sit there
sticky: false,
sticky: ctx.sticky,
// (int | optional) the time you want it to be alive for before fading out
time: '4000'
});
Tinycon.setBubble(count);
}
}
}
// Clear the chat mentions when the user clicks on the chat input box
});
// Clear the chat mentions when the user clicks on the chat input box
$('#chatinput').click(function(){
chatMentions = 0;
Tinycon.setBubble(0);

View file

@ -23,27 +23,27 @@
window.html10n = (function(window, document, undefined) {
// fix console
var console = window.console;
var console = window.console
function interceptConsole(method){
if (!console) return function() {};
if (!console) return function() {}
var original = console[method];
var original = console[method]
// do sneaky stuff
if (original.bind){
// Do this for normal browsers
return original.bind(console);
return original.bind(console)
}else{
return function() {
// Do this for IE
var message = Array.prototype.slice.apply(arguments).join(' ');
original(message);
var message = Array.prototype.slice.apply(arguments).join(' ')
original(message)
}
}
}
var consoleLog = interceptConsole('log')
, consoleWarn = interceptConsole('warn')
, consoleError = interceptConsole('warn');
, consoleError = interceptConsole('warn')
// fix Array.prototype.instanceOf in, guess what, IE! <3
@ -84,14 +84,14 @@ window.html10n = (function(window, document, undefined) {
* MicroEvent - to make any js object an event emitter (server or browser)
*/
var MicroEvent = function(){}
var MicroEvent = function(){}
MicroEvent.prototype = {
bind : function(event, fct){
bind : function(event, fct){
this._events = this._events || {};
this._events[event] = this._events[event] || [];
this._events[event].push(fct);
},
unbind : function(event, fct){
unbind : function(event, fct){
this._events = this._events || {};
if( event in this._events === false ) return;
this._events[event].splice(this._events[event].indexOf(fct), 1);
@ -100,7 +100,7 @@ window.html10n = (function(window, document, undefined) {
this._events = this._events || {};
if( event in this._events === false ) return;
for(var i = 0; i < this._events[event].length; i++){
this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1))
}
}
};
@ -122,50 +122,50 @@ window.html10n = (function(window, document, undefined) {
* and caching all necessary resources
*/
function Loader(resources) {
this.resources = resources;
this.cache = {}; // file => contents
this.langs = {}; // lang => strings
this.resources = resources
this.cache = {} // file => contents
this.langs = {} // lang => strings
}
Loader.prototype.load = function(lang, cb) {
if(this.langs[lang]) return cb();
if(this.langs[lang]) return cb()
if (this.resources.length > 0) {
var reqs = 0;
for (var i=0, n=this.resources.length; i < n; i++) {
this.fetch(this.resources[i], lang, function(e) {
reqs++;
if(e) return setTimeout(function(){ throw e }, 0);
if(e) console.warn(e)
if (reqs < n) return;// Call back once all reqs are completed
cb && cb();
cb && cb()
})
}
}
}
Loader.prototype.fetch = function(href, lang, cb) {
var that = this;
var that = this
if (this.cache[href]) {
this.parse(lang, href, this.cache[href], cb)
return;
}
var xhr = new XMLHttpRequest();
xhr.open('GET', href, /*async: */true);
var xhr = new XMLHttpRequest()
xhr.open('GET', href, /*async: */true)
if (xhr.overrideMimeType) {
xhr.overrideMimeType('application/json; charset=utf-8');
}
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200 || xhr.status === 0) {
var data = JSON.parse(xhr.responseText);
that.cache[href] = data;
var data = JSON.parse(xhr.responseText)
that.cache[href] = data
// Pass on the contents for parsing
that.parse(lang, href, data, cb);
that.parse(lang, href, data, cb)
} else {
cb(new Error('Failed to load '+href));
cb(new Error('Failed to load '+href))
}
}
};
@ -174,39 +174,39 @@ window.html10n = (function(window, document, undefined) {
Loader.prototype.parse = function(lang, currHref, data, cb) {
if ('object' != typeof data) {
cb(new Error('A file couldn\'t be parsed as json.'));
return;
cb(new Error('A file couldn\'t be parsed as json.'))
return
}
if (!data[lang]) lang = lang.substr(0, lang.indexOf('-') == -1? lang.length : lang.indexOf('-'));
if (!data[lang]) lang = lang.substr(0, lang.indexOf('-') == -1? lang.length : lang.indexOf('-'))
if (!data[lang]) {
cb(new Error('Couldn\'t find translations for '+lang));
return;
cb(new Error('Couldn\'t find translations for '+lang))
return
}
if ('string' == typeof data[lang]) {
// Import rule
// absolute path
var importUrl = data[lang];
var importUrl = data[lang]
// relative path
if(data[lang].indexOf("http") != 0 && data[lang].indexOf("/") != 0) {
importUrl = currHref+"/../"+data[lang];
importUrl = currHref+"/../"+data[lang]
}
this.fetch(importUrl, lang, cb);
return;
this.fetch(importUrl, lang, cb)
return
}
if ('object' != typeof data[lang]) {
cb(new Error('Translations should be specified as JSON objects!'));
return;
cb(new Error('Translations should be specified as JSON objects!'))
return
}
this.langs[lang] = data[lang];
this.langs[lang] = data[lang]
// TODO: Also store accompanying langs
cb();
cb()
}
@ -216,11 +216,11 @@ window.html10n = (function(window, document, undefined) {
var html10n =
{ language : null
}
MicroEvent.mixin(html10n);
MicroEvent.mixin(html10n)
html10n.macros = {};
html10n.macros = {}
html10n.rtl = ["ar","dv","fa","ha","he","ks","ku","ps","ur","yi"];
html10n.rtl = ["ar","dv","fa","ha","he","ks","ku","ps","ur","yi"]
/**
* Get rules for plural forms (shared with JetPack), see:
@ -664,14 +664,14 @@ window.html10n = (function(window, document, undefined) {
* @param langs An array of lang codes defining fallbacks
*/
html10n.localize = function(langs) {
var that = this;
var that = this
// if only one string => create an array
if ('string' == typeof langs) langs = [langs];
if ('string' == typeof langs) langs = [langs]
this.build(langs, function(er, translations) {
html10n.translations = translations;
html10n.translateElement(translations);
that.trigger('localized');
html10n.translations = translations
html10n.translateElement(translations)
that.trigger('localized')
})
}
@ -682,78 +682,78 @@ window.html10n = (function(window, document, undefined) {
* @param element A DOM element, if omitted, the document element will be used
*/
html10n.translateElement = function(translations, element) {
element = element || document.documentElement;
element = element || document.documentElement
var children = element? getTranslatableChildren(element) : document.childNodes;
for (var i=0, n=children.length; i < n; i++) {
this.translateNode(translations, children[i]);
this.translateNode(translations, children[i])
}
// translate element itself if necessary
this.translateNode(translations, element);
this.translateNode(translations, element)
}
function asyncForEach(list, iterator, cb) {
var i = 0
, n = list.length;
, n = list.length
iterator(list[i], i, function each(err) {
if(err) consoleLog(err);
i++;
if(err) consoleLog(err)
i++
if (i < n) return iterator(list[i],i, each);
cb();
cb()
})
}
function getTranslatableChildren(element) {
if(!document.querySelectorAll) {
if (!element) return [];
if (!element) return []
var nodes = element.getElementsByTagName('*')
, l10nElements = [];
, l10nElements = []
for (var i=0, n=nodes.length; i < n; i++) {
if (nodes[i].getAttribute('data-l10n-id'))
l10nElements.push(nodes[i]);
}
return l10nElements;
return l10nElements
}
return element.querySelectorAll('*[data-l10n-id]');
return element.querySelectorAll('*[data-l10n-id]')
}
html10n.get = function(id, args) {
var translations = html10n.translations;
if(!translations) return consoleWarn('No translations available (yet)');
if(!translations[id]) return consoleWarn('Could not find string '+id);
var translations = html10n.translations
if(!translations) return consoleWarn('No translations available (yet)')
if(!translations[id]) return consoleWarn('Could not find string '+id)
// apply args
var str = substArguments(translations[id], args);
var str = substArguments(translations[id], args)
// apply macros
return substMacros(id, str, args);
return substMacros(id, str, args)
// replace {{arguments}} with their values or the
// associated translation string (based on its key)
function substArguments(str, args) {
var reArgs = /\{\{\s*([a-zA-Z\.]+)\s*\}\}/
, match;
, match
while (match = reArgs.exec(str)) {
if (!match || match.length < 2)
return str; // argument key not found
return str // argument key not found
var arg = match[1]
, sub = '';
, sub = ''
if (arg in args) {
sub = args[arg];
sub = args[arg]
} else if (arg in translations) {
sub = translations[arg];
sub = translations[arg]
} else {
consoleWarn('Could not find argument {{' + arg + '}}');
return str;
consoleWarn('Could not find argument {{' + arg + '}}')
return str
}
str = str.substring(0, match.index) + sub + str.substr(match.index + match[0].length);
str = str.substring(0, match.index) + sub + str.substr(match.index + match[0].length)
}
return str;
return str
}
// replace {[macros]} with their values
@ -766,21 +766,21 @@ window.html10n = (function(window, document, undefined) {
// a macro has been found
// Note: at the moment, only one parameter is supported
var macroName = reMatch[1]
, paramName = reMatch[2];
, paramName = reMatch[2]
if (!(macroName in gMacros)) return str;
if (!(macroName in gMacros)) return str
var param;
var param
if (args && paramName in args) {
param = args[paramName];
param = args[paramName]
} else if (paramName in translations) {
param = translations[paramName];
param = translations[paramName]
}
// there's no macro parser yet: it has to be defined in gMacros
var macro = html10n.macros[macroName];
str = macro(translations, key, str, param);
return str;
var macro = html10n.macros[macroName]
str = macro(translations, key, str, param)
return str
}
}
@ -788,26 +788,26 @@ window.html10n = (function(window, document, undefined) {
* Applies translations to a DOM node (recursive)
*/
html10n.translateNode = function(translations, node) {
var str = {};
var str = {}
// get id
str.id = node.getAttribute('data-l10n-id');
if (!str.id) return;
str.id = node.getAttribute('data-l10n-id')
if (!str.id) return
if(!translations[str.id]) return consoleWarn('Couldn\'t find translation key '+str.id);
if(!translations[str.id]) return consoleWarn('Couldn\'t find translation key '+str.id)
// get args
if(window.JSON) {
str.args = JSON.parse(node.getAttribute('data-l10n-args'));
str.args = JSON.parse(node.getAttribute('data-l10n-args'))
}else{
try{
str.args = eval(node.getAttribute('data-l10n-args'));
str.args = eval(node.getAttribute('data-l10n-args'))
}catch(e) {
consoleWarn('Couldn\'t parse args for '+str.id);
consoleWarn('Couldn\'t parse args for '+str.id)
}
}
str.str = html10n.get(str.id, str.args);
str.str = html10n.get(str.id, str.args)
// get attribute name to apply str to
var prop
@ -817,31 +817,31 @@ window.html10n = (function(window, document, undefined) {
, "innerHTML": 1
, "alt": 1
, "textContent": 1
};
}
if (index > 0 && str.id.substr(index + 1) in attrList) { // an attribute has been specified
prop = str.id.substr(index + 1);
prop = str.id.substr(index + 1)
} else { // no attribute: assuming text content by default
prop = document.body.textContent ? 'textContent' : 'innerText';
prop = document.body.textContent ? 'textContent' : 'innerText'
}
// Apply translation
if (node.children.length === 0 || prop != 'textContent') {
node[prop] = str.str;
node[prop] = str.str
} else {
var children = node.childNodes,
found = false;
found = false
for (var i=0, n=children.length; i < n; i++) {
if (children[i].nodeType === 3 && /\S/.test(children[i].textContent)) {
if (!found) {
children[i].nodeValue = str.str;
found = true;
children[i].nodeValue = str.str
found = true
} else {
children[i].nodeValue = '';
children[i].nodeValue = ''
}
}
}
if (!found) {
consoleWarn('Unexpected error: could not translate element content for key '+str.id, node);
consoleWarn('Unexpected error: could not translate element content for key '+str.id, node)
}
}
}
@ -852,32 +852,32 @@ window.html10n = (function(window, document, undefined) {
*/
html10n.build = function(langs, cb) {
var that = this
, build = {};
, build = {}
asyncForEach(langs, function (lang, i, next) {
if(!lang) return next();
that.loader.load(lang, next);
that.loader.load(lang, next)
}, function() {
var lang;
langs.reverse();
var lang
langs.reverse()
// loop through priority array...
for (var i=0, n=langs.length; i < n; i++) {
lang = langs[i];
lang = langs[i]
if(!lang || !(lang in that.loader.langs)) continue;
// ... and apply all strings of the current lang in the list
// to our build object
for (var string in that.loader.langs[lang]) {
build[string] = that.loader.langs[lang][string];
build[string] = that.loader.langs[lang][string]
}
// the last applied lang will be exposed as the
// lang the page was translated to
that.language = lang;
that.language = lang
}
cb(null, build);
cb(null, build)
})
}
@ -893,8 +893,8 @@ window.html10n = (function(window, document, undefined) {
* Returns the direction of the language returned be html10n#getLanguage
*/
html10n.getDirection = function() {
var langCode = this.language.indexOf('-') == -1? this.language : this.language.substr(0, this.language.indexOf('-'));
return html10n.rtl.indexOf(langCode) == -1? 'ltr' : 'rtl';
var langCode = this.language.indexOf('-') == -1? this.language : this.language.substr(0, this.language.indexOf('-'))
return html10n.rtl.indexOf(langCode) == -1? 'ltr' : 'rtl'
}
/**
@ -903,28 +903,28 @@ window.html10n = (function(window, document, undefined) {
html10n.index = function () {
// Find all <link>s
var links = document.getElementsByTagName('link')
, resources = [];
, resources = []
for (var i=0, n=links.length; i < n; i++) {
if (links[i].type != 'application/l10n+json')
continue;
resources.push(links[i].href);
resources.push(links[i].href)
}
this.loader = new Loader(resources);
this.trigger('indexed');
this.loader = new Loader(resources)
this.trigger('indexed')
}
if (document.addEventListener) // modern browsers and IE9+
document.addEventListener('DOMContentLoaded', function() {
html10n.index();
}, false);
html10n.index()
}, false)
else if (window.attachEvent)
window.attachEvent('onload', function() {
html10n.index();
}, false);
html10n.index()
}, false)
// gettext-like shortcut
if (window._ === undefined)
window._ = html10n.get;
return html10n;
})(window, document);
return html10n
})(window, document)

View file

@ -469,14 +469,6 @@ var pad = {
userAgent: pad.getDisplayUserAgent()
};
if (clientVars.specialKey)
{
pad.myUserInfo.specialKey = clientVars.specialKey;
if (clientVars.specialKeyTranslation)
{
$("#specialkeyarea").html("mode: " + String(clientVars.specialKeyTranslation).toUpperCase());
}
}
padimpexp.init(this);
padsavedrevs.init(this);
@ -662,8 +654,8 @@ var pad = {
{
alertBar.displayMessage(function(abar)
{
abar.find("#servermsgdate").html(" (" + padutils.simpleDateTime(new Date) + ")");
abar.find("#servermsgtext").html(m.text);
abar.find("#servermsgdate").text(" (" + padutils.simpleDateTime(new Date) + ")");
abar.find("#servermsgtext").text(m.text);
});
}
if (m.js)

View file

@ -76,7 +76,6 @@ var padconnectionstatus = (function()
},
isFullyConnected: function()
{
padmodals.hideOverlay();
return status.what == 'connected';
},
getStatus: function()

View file

@ -40,22 +40,10 @@ var padmodals = (function()
});
},
showOverlay: function(duration) {
$("#overlay").show().css(
{
'opacity': 0
}).animate(
{
'opacity': 1
}, duration);
$("#overlay").show();
},
hideOverlay: function(duration) {
$("#overlay").animate(
{
'opacity': 0
}, duration, function()
{
$("#modaloverlay").hide();
});
$("#overlay").hide();
}
};
return self;

View file

@ -116,7 +116,7 @@ var paduserlist = (function()
nameHtml = '<input data-l10n-id="pad.userlist.unnamed" type="text" class="editempty newinput" value="'+_('pad.userlist.unnamed')+'" ' + (isNameEditable(data) ? '' : 'disabled="disabled" ') + '/>';
}
return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + data.color + '">&nbsp;</div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join('');
return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + padutils.escapeHtml(data.color) + '">&nbsp;</div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join('');
}
function getRowHtml(id, innerHtml, authorId)

View file

@ -43,8 +43,13 @@ describe("bold button", function(){
//select this text element
$firstTextElement.sendkeys('{selectall}');
if(inner$.browser.mozilla){ // if it's a mozilla browser
var evtType = "keypress";
}else{
var evtType = "keydown";
}
var e = inner$.Event("keydown");
var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key
e.which = 66; // b
inner$("#innerdocbody").trigger(e);

View file

@ -15,7 +15,13 @@ describe("indentation button", function(){
//select this text element
$firstTextElement.sendkeys('{selectall}');
var e = inner$.Event("keydown");
if(inner$.browser.mozilla){ // if it's a mozilla browser
var evtType = "keypress";
}else{
var evtType = "keydown";
}
var e = inner$.Event(evtType);
e.keyCode = 9; // tab :|
inner$("#innerdocbody").trigger(e);

View file

@ -44,7 +44,13 @@ describe("italic some text", function(){
//select this text element
$firstTextElement.sendkeys('{selectall}');
var e = inner$.Event("keydown");
if(inner$.browser.mozilla){ // if it's a mozilla browser
var evtType = "keypress";
}else{
var evtType = "keydown";
}
var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key
e.which = 105; // i
inner$("#innerdocbody").trigger(e);

View file

@ -47,12 +47,18 @@ describe("undo button then redo button", function(){
var modifiedValue = $firstTextElement.text(); // get the modified value
expect(modifiedValue).not.to.be(originalValue); // expect the value to change
var e = inner$.Event("keydown");
if(inner$.browser.mozilla){ // if it's a mozilla browser
var evtType = "keypress";
}else{
var evtType = "keydown";
}
var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key
e.which = 90; // z
inner$("#innerdocbody").trigger(e);
var e = inner$.Event("keydown");
var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key
e.which = 121; // y
inner$("#innerdocbody").trigger(e);

View file

@ -44,7 +44,13 @@ describe("undo button", function(){
var modifiedValue = $firstTextElement.text(); // get the modified value
expect(modifiedValue).not.to.be(originalValue); // expect the value to change
var e = inner$.Event("keydown");
if(inner$.browser.mozilla){ // if it's a mozilla browser
var evtType = "keypress";
}else{
var evtType = "keydown";
}
var e = inner$.Event(evtType);
e.ctrlKey = true; // Control key
e.which = 90; // z
inner$("#innerdocbody").trigger(e);