summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2012-05-30 17:18:43 +0200
committerEgil Moeller <egil.moller@freecode.no>2012-05-30 17:18:43 +0200
commit27f25b8c61b18f290a72cf154aa8462ed5bce338 (patch)
tree357ff3a228423eec5fcfef41933ac4a4533ce93c /src
parent357ca73a998b4a76450321ae43cef2c40ffacb55 (diff)
downloadetherpad-lite-27f25b8c61b18f290a72cf154aa8462ed5bce338.zip
Added hook to catch edit events
Diffstat (limited to 'src')
-rw-r--r--src/static/js/ace2_inner.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 723d410f..cc9f1288 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -341,6 +341,11 @@ function Ace2Inner(){
return rep;
};
+ editorInfo.ace_getAuthor = function()
+ {
+ return thisAuthor;
+ }
+
var currentCallStack = null;
function inCallStack(type, action)
@@ -439,6 +444,14 @@ function Ace2Inner(){
try
{
result = action();
+
+ hooks.callAll('aceEditEvent', {
+ callstack: currentCallStack,
+ editorInfo: editorInfo,
+ rep: rep,
+ documentAttributeManager: documentAttributeManager
+ });
+
//console.log("Just did action for: "+type);
cleanExit = true;
}
@@ -522,6 +535,7 @@ function Ace2Inner(){
{
return rep.lines.atOffset(charOffset).key;
}
+
function dispose()
{