mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Merge pull request #757 from redhog/aceEditEvent
Ace edit event as hook to modify changes as they happen
This commit is contained in:
commit
cc72868636
2 changed files with 19 additions and 4 deletions
|
@ -239,10 +239,6 @@ require.setGlobalKeyPath("require");\n\
|
||||||
iframeHTML.push(doctype);
|
iframeHTML.push(doctype);
|
||||||
iframeHTML.push("<html><head>");
|
iframeHTML.push("<html><head>");
|
||||||
|
|
||||||
hooks.callAll("aceInitInnerdocbodyHead", {
|
|
||||||
iframeHTML: iframeHTML
|
|
||||||
});
|
|
||||||
|
|
||||||
// calls to these functions ($$INCLUDE_...) are replaced when this file is processed
|
// calls to these functions ($$INCLUDE_...) are replaced when this file is processed
|
||||||
// and compressed, putting the compressed code from the named file directly into the
|
// and compressed, putting the compressed code from the named file directly into the
|
||||||
// source here.
|
// source here.
|
||||||
|
@ -277,6 +273,11 @@ require.setGlobalKeyPath("require");\n\
|
||||||
iframeHTML.push('<\/script>');
|
iframeHTML.push('<\/script>');
|
||||||
|
|
||||||
iframeHTML.push('<style type="text/css" title="dynamicsyntax"></style>');
|
iframeHTML.push('<style type="text/css" title="dynamicsyntax"></style>');
|
||||||
|
|
||||||
|
hooks.callAll("aceInitInnerdocbodyHead", {
|
||||||
|
iframeHTML: iframeHTML
|
||||||
|
});
|
||||||
|
|
||||||
iframeHTML.push('</head><body id="innerdocbody" class="syntax" spellcheck="false"> </body></html>');
|
iframeHTML.push('</head><body id="innerdocbody" class="syntax" spellcheck="false"> </body></html>');
|
||||||
|
|
||||||
// Expose myself to global for my child frame.
|
// Expose myself to global for my child frame.
|
||||||
|
|
|
@ -341,6 +341,11 @@ function Ace2Inner(){
|
||||||
return rep;
|
return rep;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
editorInfo.ace_getAuthor = function()
|
||||||
|
{
|
||||||
|
return thisAuthor;
|
||||||
|
}
|
||||||
|
|
||||||
var currentCallStack = null;
|
var currentCallStack = null;
|
||||||
|
|
||||||
function inCallStack(type, action)
|
function inCallStack(type, action)
|
||||||
|
@ -439,6 +444,14 @@ function Ace2Inner(){
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = action();
|
result = action();
|
||||||
|
|
||||||
|
hooks.callAll('aceEditEvent', {
|
||||||
|
callstack: currentCallStack,
|
||||||
|
editorInfo: editorInfo,
|
||||||
|
rep: rep,
|
||||||
|
documentAttributeManager: documentAttributeManager
|
||||||
|
});
|
||||||
|
|
||||||
//console.log("Just did action for: "+type);
|
//console.log("Just did action for: "+type);
|
||||||
cleanExit = true;
|
cleanExit = true;
|
||||||
}
|
}
|
||||||
|
@ -522,6 +535,7 @@ function Ace2Inner(){
|
||||||
{
|
{
|
||||||
return rep.lines.atOffset(charOffset).key;
|
return rep.lines.atOffset(charOffset).key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function dispose()
|
function dispose()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue