Class WebappTextModeState


  • @API(type=INTERNAL,
         src=PUBLIC)
    public class WebappTextModeState
    extends java.lang.Object
    The state of the document that can be input to a text editor.
    • Constructor Summary

      Constructors 
      Constructor Description
      WebappTextModeState​(java.lang.String xmlContent, int caretOffset)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCaretOffset()
      Returns caret position in the XML content that corresponds to the caret position in Author mode.
      java.lang.String getXmlContent()
      Returns the XML content in text format that can be saved on disk or edited in a normal text editor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebappTextModeState

        public WebappTextModeState​(java.lang.String xmlContent,
                                   int caretOffset)
        Constructor.
        Parameters:
        xmlContent - The text mode content.
        caretOffset - The caret offset.
    • Method Detail

      • getXmlContent

        public java.lang.String getXmlContent()
        Returns the XML content in text format that can be saved on disk or edited in a normal text editor.
        Returns:
        the XML content in text format that can be saved on disk or edited in a normal text editor.
      • getCaretOffset

        public int getCaretOffset()
        Returns caret position in the XML content that corresponds to the caret position in Author mode.
        Returns:
        the offset of the caret in text mode.