[TYPO3-project-formidable] renderlet TinyMce: OnKeyUp event - Is there one?

Hauke Hain newgrp at googlemail.com
Sun Feb 22 19:41:55 CET 2009


Hello,

I would like the onkey event like it works with the text renderlet.

Here the XML:
  <renderlet:TINYMCE name="Text" label="LLL:Form.">
   <config width="500" height="200" theme="advanced">
      </config>
      <validators>
        <validator:STANDARD>
          <minsize>
            <value>2500</value>
            <message>LLL:Form.err.short</message>
          </minsize>
          <maxsize>
            <value>60000</value>
            <message>LLL:Form.err.long</message>
          </maxsize>
        </validator:STANDARD>
      </validators>
      <onkeyup runat="client">
    <userobj>
     <js><![CDATA[

 sTxt = this.rdt('Text').getValue().strip();

 if((sTxt.length > 2499) && (sTxt.length < 60001)) {
  document.getElementById('TextOK').innerHTML='<img src="ok.png" 
alt="OK"/>';
 } else {
  document.getElementById('TextOK').innerHTML='<img src="error.png" 
alt="Error"/>';
 }
     ]]></js>
    </userobj>
   </onkeyup>
      <wrap>|<![CDATA[<span class="error" id="TextOK"></span>]]></wrap>
  </renderlet:TINYMCE>

I am not firm with JavaScript / AJAX etc. so it would be nice if you can 
give me a hint where / how I can reach the same.
( adding a Image after the textarea if there are enough characters).

Hoping for soon an answer...

Hauke 



More information about the TYPO3-project-formidable mailing list