Class FormattedTextEditableView.HtmlChangeListener

  • Enclosing class:
    FormattedTextEditableView

    public class FormattedTextEditableView.HtmlChangeListener
    extends Object
    Listener of changing HTML contents. Methods defined here are called from JavaScipt code. Must be defined as public for JavaScript code availability.
    • Constructor Detail

      • HtmlChangeListener

        public HtmlChangeListener()
    • Method Detail

      • onHtmlChanged

        public void onHtmlChanged​(String html)
        Called when HTML contents of the editor has been changed.
        Parameters:
        html - new HTML contents
      • onSelectionChanged

        public void onSelectionChanged​(int offset,
                                       int length,
                                       JSObject tags,
                                       JSObject mods)
        Called when the current selection in HTML editor has been changed.
        Parameters:
        offset - cursor offset from the beginning
        length - selection length including tags
        tags - html tags in selection
        mods - modification flags of selected text; the first two elements contain font name and font size, the others correspond to command names applied to selected text