From 6d1cba225978f76619659eb28e174e3f945d834f Mon Sep 17 00:00:00 2001 From: Gedion Date: Sat, 8 Sep 2012 12:11:04 -0500 Subject: [PATCH] added hooks to contentcollector.js --- src/static/js/contentcollector.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js index bb814212b..a1860cbad 100644 --- a/src/static/js/contentcollector.js +++ b/src/static/js/contentcollector.js @@ -376,6 +376,18 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class { var txt = dom.nodeValue(node); var tname = dom.nodeAttr(node.parentNode,"name"); + /* + * Called from: src/static/js/contentcollector.js + * + * Context - + * cc - the contentcollector object + * state - the current state of the change being made + * tname - the tag name of this node currently being processed + * text - the text for that line + * This hook allows you to validate/manipulate the text before it sent to the server side. + * The return value should the validate/manipulated text. + * + */ var txtFromHook = hooks.callAll('collectContentLineText', { cc: this, state: state, @@ -453,14 +465,15 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class var tname = (dom.nodeTagName(node) || "").toLowerCase(); if (tname == "br") /* - *Called from: src/static/js/contentcollector.js + * Called from: src/static/js/contentcollector.js * + * Context - * cc - the contentcollector object * state - the current state of the change being made * tname - the tag name of this node currently being processed * * This hook is provided to allow Whether the br tag should induce a new magic domline or not. - * The return value should be either true(break the line) or values. + * The return value should be either true(break the line) or false. * */ {