mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Added 2 new Hooks
+ aceInitialized is called when ace has been fully initialized + aceRegisterBlockElements allows to register new Block Elements with ace.
This commit is contained in:
parent
81f14fa157
commit
7418f08dc7
1 changed files with 13 additions and 1 deletions
|
@ -35,6 +35,8 @@ var isNodeText = Ace2Common.isNodeText,
|
||||||
binarySearchInfinite = Ace2Common.binarySearchInfinite,
|
binarySearchInfinite = Ace2Common.binarySearchInfinite,
|
||||||
htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
|
htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
|
||||||
noop = Ace2Common.noop;
|
noop = Ace2Common.noop;
|
||||||
|
var hooks = require('./pluginfw/hooks');
|
||||||
|
|
||||||
|
|
||||||
function Ace2Inner(){
|
function Ace2Inner(){
|
||||||
|
|
||||||
|
@ -2871,6 +2873,10 @@ function Ace2Inner(){
|
||||||
"ul": 1
|
"ul": 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_.each(hooks.callAll('aceRegisterBlockElements'), function(element){
|
||||||
|
_blockElems[element] = 1;
|
||||||
|
})
|
||||||
|
|
||||||
function isBlockElement(n)
|
function isBlockElement(n)
|
||||||
{
|
{
|
||||||
return !!_blockElems[(n.tagName || "").toLowerCase()];
|
return !!_blockElems[(n.tagName || "").toLowerCase()];
|
||||||
|
@ -5430,6 +5436,12 @@ function Ace2Inner(){
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
hooks.callAll('aceInitialized', {
|
||||||
|
editorInfo: editorInfo,
|
||||||
|
rep: rep,
|
||||||
|
documentAttributeManager: documentAttributeManager
|
||||||
|
});
|
||||||
|
|
||||||
scheduler.setTimeout(function()
|
scheduler.setTimeout(function()
|
||||||
{
|
{
|
||||||
parent.readyFunc(); // defined in code that sets up the inner iframe
|
parent.readyFunc(); // defined in code that sets up the inner iframe
|
||||||
|
|
Loading…
Reference in a new issue