Hi,
Here's my problem: Couch is adding paragraph tags after each first word of a new paragraph.
I have a richtext field
I've asked something about the jquery on stack exchange (over here), maybe the codes don't work well together, but i can't find what is causing the error.
The website is http://ruudvoesten.nl/index6.php and the problem I'm talking about is in the Biografie section.
Here's my problem: Couch is adding paragraph tags after each first word of a new paragraph.
I have a richtext field
- Code: Select all
<cms:editable name='box3_text2' label='Text' group='box3_group' type='richtext' toolbar='basic' />
- Code: Select all
$(document).ready(function(){ var currentCol = $('.col:first'); var text = currentCol.html(); currentCol.text(''); text = text.replace(/ (?![^<>]*>)/gi, '%^%'); var wordArray = text.split('%^%'); $.fn.hasOverflow = function() { if($(this).attr('id')){ var div= document.getElementById($(this).attr('id')); return div.scrollHeight>div.clientHeight; } }; for(var x=0; x<wordArray.length; x++){ var word= wordArray[x]; currentCol.append(word+' '); if (currentCol.hasOverflow()){ if(!currentCol.hasClass('col2')){ currentCol = currentCol.parent().parent().find(('.col2')); } } }
I've asked something about the jquery on stack exchange (over here), maybe the codes don't work well together, but i can't find what is causing the error.
The website is http://ruudvoesten.nl/index6.php and the problem I'm talking about is in the Biografie section.