summaryrefslogtreecommitdiffstats
path: root/infrastructure/ace/www/domline.js
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/ace/www/domline.js')
-rw-r--r--infrastructure/ace/www/domline.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/infrastructure/ace/www/domline.js b/infrastructure/ace/www/domline.js
index 70f86cc..38cddf5 100644
--- a/infrastructure/ace/www/domline.js
+++ b/infrastructure/ace/www/domline.js
@@ -1,4 +1,5 @@
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.domline
+// %APPJET%: import("etherpad.admin.plugins");
/**
* Copyright 2009 Google Inc.
@@ -16,6 +17,10 @@
* limitations under the License.
*/
+// requires: top
+// requires: plugins
+// requires: undefined
+
var domline = {};
domline.noop = function() {};
domline.identity = function(x) { return x; };
@@ -92,12 +97,22 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) {
return space+tag;
});
}
+
+ var extraOpenTags = "";
+ var extraCloseTags = "";
+
+ ((top == undefined) ? plugins : top.plugins).callHook(
+ "aceCreateDomLine", {domline:domline, cls:cls}
+ ).map(function (modifier) {
+ cls = modifier.cls;
+ extraOpenTags = extraOpenTags+modifier.extraOpenTags;
+ extraCloseTags = modifier.extraCloseTags+extraCloseTags;
+ });
+
if ((! txt) && cls) {
lineClass = domline.addToLineClass(lineClass, cls);
}
else if (txt) {
- var extraOpenTags = "";
- var extraCloseTags = "";
if (href) {
extraOpenTags = extraOpenTags+'<a href="'+
href.replace(/\"/g, '&quot;')+'">';