<p:editor does not have an option for this, you can use jquery to solve it. My solution is the event of binding binding to your editor. I just tested, my example has one form (id: fm), one editor (id: rongnk), one output text (id: txt):
<h:body onload="bindiframe()"> <h:form id="fm"> <p:editor id="rongnk" value="xxx"> </p:editor> <h:outputText id="txt"/> <script type="text/javascript"> var imax = 50; function bindiframe(){ $('#fm\\:rongnk').find('iframe').contents().find("body").on('keyup', function(e) { ilength = $('#fm\\:rongnk').find('iframe').contents().find("body").text().length; $('#fm\\:txt').html('Remain:' + (imax - ilength)); }); } </script> </h:form> </h:body>
source share