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("<html><head>");
|
||||
|
||||
hooks.callAll("aceInitInnerdocbodyHead", {
|
||||
iframeHTML: iframeHTML
|
||||
});
|
||||
|
||||
// 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
|
||||
// source here.
|
||||
|
@ -277,6 +273,11 @@ require.setGlobalKeyPath("require");\n\
|
|||
iframeHTML.push('<\/script>');
|
||||
|
||||
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>');
|
||||
|
||||
// Expose myself to global for my child frame.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -523,6 +536,7 @@ function Ace2Inner(){
|
|||
return rep.lines.atOffset(charOffset).key;
|
||||
}
|
||||
|
||||
|
||||
function dispose()
|
||||
{
|
||||
disposed = true;
|
||||
|
|
Loading…
Reference in a new issue