2 Replies Latest reply on Aug 20, 2009 11:34 AM by gena777

    rich:hotKey doesn't work from focused rich:editor

    gena777

      Hello,

      i use rich:editor and wish to save the text on pressing ctrl+s. It works with the <rich:hotKey> quite fine, but not if the editor is focused (is being edited), so the effect of ctrl+s is not noticeable.


      Thanks,

      Gena

        • 1. Re: rich:hotKey doesn't work from focused rich:editor
          ilya_shaikovsky

          It's not worked seems because tinyMCE works with separate document in iframe, so handlers at main page just not getting notified. Just check tinyMCE documentation in order to check how to call some js from editor and use jsFunction to handle such calls.

          • 2. Re: rich:hotKey doesn't work from focused rich:editor
            gena777

            Thank you, Ilya!

            I found a solution, if someone interested here it is:

            1. Enable tinymce plugin save:

            plugins="save"

            2. Konfigure this plugin:

            <f:param name="save_enablewhendirty" value="true"/>
            <f:param name="save_onsavecallback" value="save"/>

            3. Define callback save:

            <a:jsFunction name="save" action="..." />

            and it works fine.

            Gena