The function addDropCap(); removes the space before any word with a <strong>word here</strong> tag placed inside an article,
addDropCap = function () {
var contents = getElementsByClass('article-content');
if (!contents) return;
for (j=0;j<contents.length;j++){
node = contents[j];
while (node.childNodes.length) {
node = node.firstChild;
while (($(node) && $(node).getText().trim()=='')||(node.nodeType==3 && node.nodeValue.trim()=='')) {
node = node.nextSibling;
}
if ($type(node) == 'textnode') break;
}
if ($type(node)=='textnode') {
var val = node.nodeValue.trim();
var dc = document.createElement('span');
dc.className = 'dropcap';
dc.innerHTML = val.charAt(0);
node.nodeValue = val.substr(1);
node.parentNode.insertBefore(dc, node);
}
}
}
Does any one know how to fix it?
thanks