Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
086132d
dont die on bad html but only warn to api logger but dont tell client…
JohnMcLear Feb 12, 2013
e152c47
include the callback call, for sanity and stop the pad from being nuk…
JohnMcLear Feb 12, 2013
9e1dfc9
docs for setHTML
JohnMcLear Feb 12, 2013
198110e
drunk comments
JohnMcLear Feb 12, 2013
7c03bc2
when exporting HTML include html and body
JohnMcLear Feb 14, 2013
fe0104f
Use rev-parse to get short commit hash
graingert May 31, 2013
c3a58f4
Added a better way of detecting when a url does not have a protocol s…
Oct 21, 2013
7ab65d7
Refactors APIHandler:callAPI
19h Oct 24, 2013
f532c1c
Merge pull request #1968 from KenanSulayman/patch-1
marcelklehr Oct 25, 2013
940f114
Record metrics with 'measured'
marcelklehr Oct 27, 2013
387091c
Expose current stats at /stats
marcelklehr Oct 27, 2013
84b19a5
Localisation updates from http://translatewiki.net.
siebrand Oct 27, 2013
3ad4b1b
stats: Add http500, memoryUsage, pendingEdits gauges
marcelklehr Oct 27, 2013
5bce9bc
Add docs for stats
marcelklehr Oct 27, 2013
7b84e73
Merge branch 'metrics' into develop
marcelklehr Oct 28, 2013
975eae3
Merge pull request #1963 from eyesonlyhack/allLinksTranslatingToHTTP
marcelklehr Oct 28, 2013
e725113
Merge branch 'pr/1789' into develop
marcelklehr Oct 28, 2013
8ab2442
Update padList correctly
marcelklehr Nov 1, 2013
68caa06
Merge pull request #1974 from ether/fix/fix-list-all-pads
marcelklehr Nov 2, 2013
c9b80c6
Localisation updates from http://translatewiki.net.
siebrand Nov 4, 2013
a4194ef
Fixed #1981 - uncomplete HTTP API documentation
ldidry Nov 7, 2013
5bccfdf
Forgot a small chunck of documentation for getRevisionChangeset
ldidry Nov 7, 2013
7e6e250
Merge pull request #1983 from ldidry/fix/uncomplete-api-doc
JohnMcLear Nov 7, 2013
b769aca
Forgot to bump the API version
ldidry Nov 7, 2013
3c4c0de
Merge pull request #1985 from ldidry/fix/uncomplete-api-doc
JohnMcLear Nov 7, 2013
8e5af48
en.json: Add keyboard shortcuts for indent and outdent to translations
marcelklehr Nov 8, 2013
932c9ae
allow nix file process path to be visible in ps aux
JohnMcLear Nov 10, 2013
5c1daa3
Merge pull request #1990 from ether/run-path-available-in-ps-aux
JohnMcLear Nov 10, 2013
fa4ebd6
Update installDeps.sh
JohnMcLear Nov 12, 2013
1ee7c70
Localisation updates from http://translatewiki.net.
siebrand Nov 12, 2013
1f68f07
support node 0.11
JohnMcLear Nov 14, 2013
ccd4300
Merge pull request #1994 from ether/node11
JohnMcLear Nov 14, 2013
29d8bb7
add pad copy/move API functions
s1341 Nov 17, 2013
93fcab0
change parameter names
s1341 Nov 17, 2013
52a99eb
fix bugs, add force option to overwrite destination
s1341 Nov 18, 2013
571ef15
Merge pull request #1995 from s1341/add_pad_copy
JohnMcLear Nov 18, 2013
5409cda
add some documentation for move/copy
s1341 Nov 18, 2013
47efc1f
Merge pull request #1996 from s1341/add_pad_copy
JohnMcLear Nov 18, 2013
53bcbfc
Don't link to windows build from README
marcelklehr Nov 18, 2013
1066617
Localisation updates from http://translatewiki.net.
siebrand Nov 19, 2013
117a4ab
Localisation updates from http://translatewiki.net.
siebrand Nov 21, 2013
5d803a0
Fix walking caret bug
marcelklehr Nov 22, 2013
8b821d4
Merge pull request #2004 from ether/fix/walking-caret
JohnMcLear Nov 22, 2013
61df1fa
semi-working build script for deb packages
JohnMcLear Nov 24, 2013
bb40644
ignore deb and create user
JohnMcLear Nov 24, 2013
09429be
whoops
JohnMcLear Nov 24, 2013
9d2f5e5
Merge branch 'packaging' of github.com:ether/etherpad-lite into packa…
JohnMcLear Nov 24, 2013
678c80d
whoa there, no need to include .git folder in build
JohnMcLear Nov 24, 2013
d6f1aa3
clean
JohnMcLear Nov 24, 2013
6ee5774
whoopsi
JohnMcLear Nov 24, 2013
1eef527
growwlll
JohnMcLear Nov 24, 2013
97f5b58
cp readme on build
JohnMcLear Nov 24, 2013
8c1e066
mkdir
JohnMcLear Nov 24, 2013
45e0680
move copy/move pad into a new api version
s1341 Nov 24, 2013
81cf3a6
Merge pull request #2008 from s1341/add_pad_copy
JohnMcLear Nov 24, 2013
252be19
make sticky chat mroe responsive to changes in top bar
JohnMcLear Nov 25, 2013
3be1ee5
slightly cleaner
JohnMcLear Nov 25, 2013
b527ef2
Merge pull request #2010 from ether/sticky-chat-resize
JohnMcLear Nov 25, 2013
fb69e6b
Merge pull request #2007 from ether/packaging
JohnMcLear Nov 25, 2013
7550be0
strip off trailing commas
s1341 Nov 19, 2013
9b7203d
have the server parse the settings file using minify and strip commas
s1341 Nov 26, 2013
5181b3e
add josnminify to package.json
s1341 Nov 26, 2013
1fa2b32
Merge pull request #1999 from s1341/fix_json_is_bad
JohnMcLear Nov 26, 2013
6fcc7c7
not working and erally confused
JohnMcLear Nov 27, 2013
271dd66
foo
JohnMcLear Nov 28, 2013
dee2dab
getAttributeOnSelection function
JohnMcLear Nov 28, 2013
e9f7583
some nice css to that reflect when a button is active
JohnMcLear Nov 28, 2013
b4877f0
handle logic for line lengths with 0
JohnMcLear Dec 1, 2013
3791ad4
ends of line shouldn't show incorrect formatted status
JohnMcLear Dec 1, 2013
39f81fd
remove post ace event
JohnMcLear Dec 1, 2013
95db100
remove white space
JohnMcLear Dec 1, 2013
30f577e
dont assume formatting is on the start of any line
JohnMcLear Dec 1, 2013
f2e63df
Localisation updates from https://translatewiki.net.
siebrand Dec 2, 2013
de3a657
Update pad.html
Dec 2, 2013
03ff556
Merge pull request #2017 from eloydegen/master
JohnMcLear Dec 2, 2013
378e079
allow for lighter colors
JohnMcLear Dec 4, 2013
749e557
after Edit eejs block
JohnMcLear Dec 4, 2013
20b27c6
Merge branch 'afterEditHook' of github.com:ether/etherpad-lite into g…
JohnMcLear Dec 4, 2013
3d8452b
Replace tabs indentation with spaces indentation
ldidry Dec 5, 2013
60017e9
Merge pull request #2019 from ether/lighter-colors
marcelklehr Dec 5, 2013
37442d3
Merge pull request #2021 from ldidry/fix-no-tab-indent
marcelklehr Dec 5, 2013
03d5acf
Localisation updates from https://translatewiki.net.
siebrand Dec 5, 2013
01c7108
fix closing of </title> tag
webzwo0i Dec 6, 2013
98c4e32
Merge pull request #2026 from ether/afterEditHook
JohnMcLear Dec 7, 2013
8a547b2
resolve issue where first char showed all formatting
JohnMcLear Dec 7, 2013
d9ef40f
docs but not sure how to specify the verison this was introduced
JohnMcLear Dec 7, 2013
8679170
fix export so no tags are omitted
webzwo0i Dec 8, 2013
70c51d7
add some documentation for styling attributes export
webzwo0i Dec 8, 2013
a534b1e
some more docs for attribute export and cleanup empty lines
webzwo0i Dec 8, 2013
656a558
be more clear about the value in propVals
webzwo0i Dec 8, 2013
5176958
workaround so that at least one tag stays open if its the outermost t…
webzwo0i Dec 8, 2013
f968b5a
useless var statement (function scope)
webzwo0i Dec 8, 2013
27e0c37
refactor export of style attributes
webzwo0i Dec 8, 2013
0fa0d6d
remove now unused code
webzwo0i Dec 8, 2013
c3081c0
function scope: variables only need to be declared once
webzwo0i Dec 8, 2013
9557dc9
remove unused require
webzwo0i Dec 8, 2013
e1fbb1d
fix loop
webzwo0i Dec 8, 2013
4044d5a
remove hidden input field padId which is send on every import but not…
webzwo0i Dec 8, 2013
f25fed1
[ace2_inner] remove incorpIfQuick because its unused since July
webzwo0i Dec 8, 2013
8175af3
[collab_client] remove socketid because its not used
webzwo0i Dec 8, 2013
eee3559
[ace2_inner] remove unused function htmlForRemovedChild
webzwo0i Dec 8, 2013
3dc844e
[ace2_inner] remove unused getLineKeyForOffset that was part of old r…
webzwo0i Dec 8, 2013
a714f63
[ace2inner] remove unused recolorLineByKey that was part of old recol…
webzwo0i Dec 8, 2013
4dd3584
[ace2inner] remove unused function boldColorFromColor
webzwo0i Dec 8, 2013
020bd39
remove empty&unused overlaysdiv
webzwo0i Dec 8, 2013
e04f46d
[ace2_inner] init() has replaced setup(), reflect this change in the …
webzwo0i Dec 8, 2013
021db28
[Changeset] a?lines_length was not used within inverse function
webzwo0i Dec 8, 2013
ca6f877
[padDiff] remove unused functions a?lines_length
webzwo0i Dec 8, 2013
aadcfbb
do not send globalPadId in clientvars - its not used anywhere
webzwo0i Dec 8, 2013
6aaf4c4
[collab_client] remove keys function, which was not used and variable…
webzwo0i Dec 8, 2013
1fa8c2a
[collab_client] remove unused function getStats
webzwo0i Dec 8, 2013
906ab18
[timeslider] do not include underscore, as its not (longer) used
webzwo0i Dec 8, 2013
ab797c9
[pad_connectionstatus] padeditbar is not used anywhere in pad_connect…
webzwo0i Dec 8, 2013
9400425
[virtual_lines] remove traces of virtual_lines/makeVirtualLineView. t…
webzwo0i Dec 8, 2013
77cf2aa
[pad_modals] remove unused variables. for the hide/show functions jqu…
webzwo0i Dec 8, 2013
bae7766
Merge pull request #2027 from webzwo0i/fix-import
JohnMcLear Dec 9, 2013
505dc70
Merge pull request #2013 from ether/getAttributeOnSelection
JohnMcLear Dec 9, 2013
3180b96
Remove console logs
JohnMcLear Dec 9, 2013
438f3fc
Merge pull request #2030 from ether/import_hook
JohnMcLear Dec 9, 2013
24e96c4
Merge pull request #2028 from webzwo0i/remove-deadcode
JohnMcLear Dec 9, 2013
58bbfd8
resolve merge conflict
JohnMcLear Dec 9, 2013
58cd71d
Merge branch 'fix-exporthtml-styling-tags' of https://github.com/webz…
JohnMcLear Dec 10, 2013
37015e7
Merge pull request #2032 from webzwo0i/fix-exporthtml-styling-tags
JohnMcLear Dec 10, 2013
7c4479d
Merge branch 'develop' of github.com:ether/etherpad-lite into develop
JohnMcLear Dec 12, 2013
7dd2945
Remove duplicate doc entry for setHTML()
lebrinkma Dec 14, 2013
dd8af99
Add input validation for html param in setHTML()
lebrinkma Dec 14, 2013
3d8edef
Merge pull request #2035 from lebrinkma/dont-die-on-bad-html
JohnMcLear Dec 16, 2013
7d47d91
Merge pull request #1514 from ether/dont-die-on-bad-html
JohnMcLear Dec 16, 2013
6f6a86f
Localisation updates from https://translatewiki.net.
siebrand Dec 17, 2013
5add631
Fix server side bug index overflow
s1341 Dec 16, 2013
d1cad04
Merge pull request #2038 from s1341/fix/server_not_checking_changeset…
JohnMcLear Dec 17, 2013
adf0557
Don't crash if CHANGESET_REQ fails
marcelklehr Dec 17, 2013
af5b8d3
Merge pull request #2039 from ether/fix/dont-crash-on-failed-changese…
JohnMcLear Dec 17, 2013
8313083
better handling for attribute queries
JohnMcLear Dec 17, 2013
33ecd3d
Merge pull request #2041 from ether/fix-get-attr
JohnMcLear Dec 17, 2013
1a13843
dont error when pressing del on rep 0 0
JohnMcLear Dec 18, 2013
1c2f05c
Merge pull request #2044 from ether/ff-del-firstchar
JohnMcLear Dec 18, 2013
333d2f1
expose update browser selection function
JohnMcLear Dec 18, 2013
b5ca52a
Merge pull request #2045 from ether/exposeUpdateBrowserSel
JohnMcLear Dec 18, 2013
44f817d
Localisation updates from https://translatewiki.net.
siebrand Dec 23, 2013
1e0456c
Localisation updates from https://translatewiki.net.
siebrand Dec 28, 2013
a35254c
Localisation updates from https://translatewiki.net.
siebrand Jan 6, 2014
2f9a9d8
Localisation updates from https://translatewiki.net.
siebrand Jan 11, 2014
9ef709e
mozilla bug 844796 - use node crypto module for randomString
rhelmer Jan 15, 2014
346c039
Merge pull request #2059 from rhelmer/bug844796-session-token-generation
JohnMcLear Jan 15, 2014
ae99c5e
new randomString function should take len arg
rhelmer Jan 15, 2014
348d9a8
convert over to server-side crypto
rhelmer Jan 15, 2014
be4adec
Merge pull request #2060 from rhelmer/bug844796-session-token-generation
JohnMcLear Jan 15, 2014
3715535
Fix #2058 Add square brackets to url characters
Gared Jan 19, 2014
e4fbf4b
Merge pull request #2061 from Gared/url_square_brackets
JohnMcLear Jan 19, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ npm-debug.log
.ep_initialized
*.crt
*.key
bin/etherpad-1.deb
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ node_js:
- "0.10"
install:
- "bin/installDeps.sh"
- "export GIT_HASH=$(cat .git/HEAD | head -c 7)"
- "export GIT_HASH=$(git rev-parse --verify --short HEAD)"
before_script:
- "tests/frontend/travis/sauce_tunnel.sh"
script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Etherpad works with node v0.8 and v0.10, only. (We don't support v0.6)
### Prebuilt windows package
This package works out of the box on any windows machine, but it's not very useful for developing purposes...

1. [Download the latest windows package](http://etherpad.org/downloads/etherpad-lite-win-1.2.91-7492fb18a4.zip)
1. [Download the latest windows package](http://etherpad.org/#download)
2. Extract the folder

Now, run `start.bat` and open <http://localhost:9001> in your browser. You like it? [Next steps](#next-steps).
Expand Down
44 changes: 44 additions & 0 deletions bin/buildDebian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

# IMPORTANT
# Protect agaisnt mispelling a var and rm -rf /
set -u
set -e

SRC=/tmp/etherpad-deb-src
DIST=/tmp/etherpad-deb-dist
SYSROOT=${SRC}/sysroot
DEBIAN=${SRC}/DEBIAN

rm -rf ${DIST}
mkdir -p ${DIST}/

rm -rf ${SRC}
rsync -a bin/deb-src/ ${SRC}/
mkdir -p ${SYSROOT}/opt/

rsync --exclude '.git' -a . ${SYSROOT}/opt/etherpad/ --delete
mkdir -p ${SYSROOT}/usr/share/doc
cp README.md ${SYSROOT}/usr/share/doc/etherpad
find ${SRC}/ -type d -exec chmod 0755 {} \;
find ${SRC}/ -type f -exec chmod go-w {} \;
chown -R root:root ${SRC}/

let SIZE=`du -s ${SYSROOT} | sed s'/\s\+.*//'`+8
pushd ${SYSROOT}/
tar czf ${DIST}/data.tar.gz [a-z]*
popd
sed s"/SIZE/${SIZE}/" -i ${DEBIAN}/control
pushd ${DEBIAN}
tar czf ${DIST}/control.tar.gz *
popd

pushd ${DIST}/
echo 2.0 > ./debian-binary

find ${DIST}/ -type d -exec chmod 0755 {} \;
find ${DIST}/ -type f -exec chmod go-w {} \;
chown -R root:root ${DIST}/
ar r ${DIST}/etherpad-1.deb debian-binary control.tar.gz data.tar.gz
popd
rsync -a ${DIST}/etherpad-1.deb ./
9 changes: 9 additions & 0 deletions bin/deb-src/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: etherpad
Version: 1.3
Section: base
Priority: optional
Architecture: i386
Installed-Size: SIZE
Depends:
Maintainer: John McLear <john@mclear.co.uk>
Description: Etherpad is a collaborative editor.
7 changes: 7 additions & 0 deletions bin/deb-src/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# Start the services!

service etherpad start
echo "Give Etherpad about 3 minutes to install dependencies then visit http://localhost:9001 in your web browser"
echo "To stop etherpad type 'service etherpad stop', To restart type 'service etherpad restart'".
rm -f /tmp/etherpad.log /tmp/etherpad.err
26 changes: 26 additions & 0 deletions bin/deb-src/DEBIAN/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Installs node if it isn't already installed
#
# Don't steamroll over a previously installed node version
# TODO provide a local version of node?

VER="0.10.4"
ARCH="x86"
if [ `arch | grep 64` ]
then
ARCH="x64"
fi

# TODO test version
if [ ! -f /usr/local/bin/node ]
then
pushd /tmp
wget -c "http://nodejs.org/dist/v${VER}/node-v${VER}-linux-${ARCH}.tar.gz"
rm -rf /tmp/node-v${VER}-linux-${ARCH}
tar xf node-v${VER}-linux-${ARCH}.tar.gz -C /tmp/
cp -a /tmp/node-v${VER}-linux-${ARCH}/* /usr/local/
fi

# Create Etherpad user
adduser --system etherpad
4 changes: 4 additions & 0 deletions bin/deb-src/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Stop the appserver:
service etherpad stop || true
28 changes: 28 additions & 0 deletions bin/deb-src/sysroot/etc/init/etherpad.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
description "etherpad"

start on started networking
stop on runlevel [!2345]

env EPHOME=/opt/etherpad
env EPLOGS=/var/log/etherpad
env EPUSER=etherpad

respawn

pre-start script
cd $EPHOME
mkdir $EPLOGS ||true
chown $EPUSER $EPLOGS ||true
chmod 0755 $EPLOGS ||true
chown -R $EPUSER $EPHOME/var ||true
$EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
end script

script
cd $EPHOME/
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
>> $EPLOGS/access.log \
2>> $EPLOGS/error.log
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json"

end script
6 changes: 3 additions & 3 deletions bin/installDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ $(uname) = "SunOS" ]; then
}
fi

#Is wget installed?
#Is curl installed?
hash curl > /dev/null 2>&1 || {
echo "Please install curl" >&2
exit 1
Expand Down Expand Up @@ -44,8 +44,8 @@ fi
#check node version
NODE_VERSION=$(node --version)
NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2)
if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.10" ]; then
echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.8.x or v0.10.x" >&2
if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.10" ] && [ ! $NODE_V_MINOR = "v0.11" ]; then
echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.8.x, v0.10.x or v0.11.x" >&2
exit 1
fi

Expand Down
14 changes: 7 additions & 7 deletions bin/loadTesting/README
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ Installed Xvfb and PhantomJS

I installed Xvfb following (roughly) this guide: http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala

#sudo apt-get install xvfb
#sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
#sudo apt-get install xvfb
#sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

Launched two instances of Xvfb directly from the terminal:

#Xvfb :0 -ac
#Xvfb :1 -ac
#Xvfb :0 -ac
#Xvfb :1 -ac

I installed PhantomJS following this guide: http://code.google.com/p/phantomjs/wiki/Installation

#sudo add-apt-repository ppa:jerome-etienne/neoip
#sudo apt-get update
#sudo apt-get install phantomjs
#sudo add-apt-repository ppa:jerome-etienne/neoip
#sudo apt-get update
#sudo apt-get install phantomjs

I created a small JavaScript file for PhatomJS to use to control the browser instances:

Expand Down
2 changes: 1 addition & 1 deletion bin/loadTesting/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# connect 500 instances to display :0
for i in {1..500}
do
echo $i
echo $i
echo "Displaying Some shit"
DISPLAY=:0 screen -d -m /home/phantomjs/bin/phantomjs loader.js http://10.0.0.55:9001/p/pad2 && sleep 2
done
Expand Down
5 changes: 4 additions & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ bin/installDeps.sh $* || exit 1

#Move to the node folder and start
echo "start..."
node node_modules/ep_etherpad-lite/node/server.js $*

SCRIPTPATH=`pwd -P`
node $SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js $*

7 changes: 7 additions & 0 deletions doc/api/editorInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ Returns the `rep` object.
## editorInfo.ace_performDocumentApplyAttributesToCharRange(?)
## editorInfo.ace_setAttributeOnSelection(?)
## editorInfo.ace_toggleAttributeOnSelection(?)
## editorInfo.ace_getAttributeOnSelection(attribute)
Returns a boolean if an attribute exists on a selected range.
The attribute should be the string name of the attribute applied to the selection IE subscript
Example usage: Apply the activeButton Class to a button if an attribute is on a highlighted/selected caret position or range.
Example: `call.editorInfo.ace_getAttributeOnSelection("subscript");` // call here is the callstack from aceEditEvent.
See the ep_subscript plugin for an example of this function in action.
Notes: Does not work on first or last character of a line. Suffers from a race condition if called with aceEditEvent.
## editorInfo.ace_performSelectionChange(?)
## editorInfo.ace_doIndentOutdent(?)
## editorInfo.ace_doUndoRedo(?)
Expand Down
79 changes: 78 additions & 1 deletion doc/api/http_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Portal submits content into new blog post
## Usage

### API version
The latest version is `1.2.7`
The latest version is `1.2.8`

The current version can be queried via /api.

Expand Down Expand Up @@ -294,6 +294,65 @@ returns the text of a pad formatted as HTML
* `{code: 0, message:"ok", data: {html:"Welcome Text<br>More Text"}}`
* `{code: 1, message:"padID does not exist", data: null}`

#### setHTML(padID, html)
* API >= 1

sets the text of a pad based on HTML, HTML must be well formed. Malformed HTML will send a warning to the API log.

*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`

#### getAttributePool(padID)
* API >= 1.2.8

returns the attribute pool of a pad

*Example returns:*
* `{ "code":0,
"message":"ok",
"data": {
"pool":{
"numToAttrib":{
"0":["author","a.X4m8bBWJBZJnWGSh"],
"1":["author","a.TotfBPzov54ihMdH"],
"2":["author","a.StiblqrzgeNTbK05"],
"3":["bold","true"]
},
"attribToNum":{
"author,a.X4m8bBWJBZJnWGSh":0,
"author,a.TotfBPzov54ihMdH":1,
"author,a.StiblqrzgeNTbK05":2,
"bold,true":3
},
"nextNum":4
}
}
}`
* `{"code":1,"message":"padID does not exist","data":null}`

#### getRevisionChangeset(padID, [rev])
* API >= 1.2.8

get the changeset at a given revision, or last revision if 'rev' is not defined.

*Example returns:*
* `{ "code" : 0,
"message" : "ok",
"data" : "Z:1>6b|5+6b$Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http://etherpad.org\n"
}`
* `{"code":1,"message":"padID does not exist","data":null}`
* `{"code":1,"message":"rev is higher than the head revision of the pad","data":null}`

#### createDiffHTML(padID, startRev, endRev)
* API >= 1.2.7

returns an object of diffs from 2 points in a pad

*Example returns:*
* `{"code":0,"message":"ok","data":{"html":"<style>\n.authora_HKIv23mEbachFYfH {background-color: #a979d9}\n.authora_n4gEeMLsv1GivNeh {background-color: #a9b5d9}\n.removed {text-decoration: line-through; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=80)'; filter: alpha(opacity=80); opacity: 0.8; }\n</style>Welcome to Etherpad!<br><br>This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!<br><br>Get involved with Etherpad at <a href=\"http&#x3a;&#x2F;&#x2F;etherpad&#x2e;org\">http:&#x2F;&#x2F;etherpad.org</a><br><span class=\"authora_HKIv23mEbachFYfH\">aw</span><br><br>","authors":["a.HKIv23mEbachFYfH",""]}}`
* `{"code":4,"message":"no or wrong API Key","data":null}`

### Chat
#### getChatHistory(padID, [start, end])
* API >= 1.2.7
Expand Down Expand Up @@ -365,6 +424,24 @@ returns the list of users that are currently editing this pad

deletes a pad

*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`

#### copyPad(sourceID, destinationID[, force=false])
* API >= 1.2.8

copies a pad with full history and chat. If force is true and the destination pad exists, it will be overwritten.

*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`

#### movePad(sourceID, destinationID[, force=false])
* API >= 1.2.8

moves a pad. If force is true and the destination pad exists, it will be overwritten.

*Example returns:*
* `{code: 0, message:"ok", data: null}`
* `{code: 1, message:"padID does not exist", data: null}`
Expand Down
14 changes: 7 additions & 7 deletions doc/easysync/easysync-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ Here are descriptions of the operations, where capital letters are variables:
kept MUST be a newline, and the final newline of the document is allowed.
"*I" : Apply attribute I from the pool to the following +, =, |+, or |= command.
In other words, any number of * ops can come before a +, =, or | but not
between a | and the corresponding + or =.
between a | and the corresponding + or =.
If +, text is inserted having this attribute. If =, text is kept but with
the attribute applied as an attribute addition or removal.
Consecutive attributes must be sorted lexically by (key,value) with key
and value taken as strings. It's illegal to have duplicate keys
for (key,value) pairs that apply to the same text. It's illegal to
have an empty value for a key in the case of an insertion (+), the
pair should just be omitted.
the attribute applied as an attribute addition or removal.
Consecutive attributes must be sorted lexically by (key,value) with key
and value taken as strings. It's illegal to have duplicate keys
for (key,value) pairs that apply to the same text. It's illegal to
have an empty value for a key in the case of an insertion (+), the
pair should just be omitted.

Characters from the source text that aren't accounted for are assumed to be kept
with the same attributes.
Expand Down
1 change: 1 addition & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@include documentation
@include stats
@include localization
@include custom_static
@include api/api
Expand Down
18 changes: 18 additions & 0 deletions doc/stats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Statistics
Etherpad keeps track of the goings-on inside the edit machinery. If you'd like to have a look at this, just point your browser to `/stats`.

We currently measure:

- totalUsers (counter)
- connects (meter)
- disconnects (meter)
- pendingEdits (counter)
- edits (timer)
- failedChangesets (meter)
- httpRequests (timer)
- http500 (meter)
- memoryUsage (gauge)

Under the hood, we are happy to rely on [measured](https://github.com/felixge/node-measured) for all our metrics needs.

To modify or simply access our stats in your plugin, simply `require('ep_etherpad-lite/stats')` which is a `measured.Collection`.
Loading