JoseLuisLAPS3
Member
Hi, i'm trying to create a simple word count for the XenForo editor via jquery but i don't know exactly how to access the DOM.
I used this simple javascript code to access a normal input zone:
	
	
	
		
But i don't know how to access the Editor content (Redactor). Someone now how to access it via jquery ? maybe @cclaerhout ?
				
			I used this simple javascript code to access a normal input zone:
		Code:
	
	function count(){
    var words = $('#title').val().trim().replace(/\s+/gi, ' ').split(' ').length;
    var chars = $('#title').val().length;
    if(chars===0){words=0;}
    $('#titlecounter').html('('+ chars +')');
}
 $('#title').on('keyup propertychange paste', function(){
     count();
    });
	But i don't know how to access the Editor content (Redactor). Someone now how to access it via jquery ? maybe @cclaerhout ?