com.ephox.editlive.model
Interface DocumentManager


public interface DocumentManager

Wraps up a lot of useful methods for dealing with the Document model into a central place. As the Document model has some significant differences to a standard W3C DOM, it is often handy to have all of these on one object.

The majority of this class is simple wrapper methods, but some additional functions (eg ElementNavigator) are also provided.

Instance available via ELJBean.getDocumentManager().

Since:
7.5

Method Summary
 String getBaseURL()
          Wrapper method to ELJBean.getBaseURL().
 Element getBodyElement()
          Returns the document <body> element.
 Element getCharacterElement(int position)
          Wrapper method to DefaultStyledDocument.getCharacterElement(int).
 String getCharset()
          Returns the character set currently in use by the document.
 HTML.Tag getDeclaredCustomTag(String tagName)
          Wrapper method to CustomTagController.getDeclaredCustomTag(String).
 Document getDocument()
          Wrapper method to JTextComponent.getDocument().
 Element getElementById(String id)
          Wrapper method to HTMLDocument.getElement(String).
 ElementInfo getElementInfo(Element element)
          Collects the Element info for an element.
 ElementNavigator getElementNavigator(Element element)
          Creates an Element navigator for an element.
 Element getParagraphElement(int position)
          Wrapper method to DefaultStyledDocument.getParagraphElement(int).
 String getReturnBodyOnly()
          Obtains the value of the returnBodyOnly option.
 String getStyles()
          Wrapper method to ELJBean.getStyles().
 TableManager getTableManager()
          Wrapper method to ELJBean.getTableManager().
 boolean idExistsInDocument(String id)
          Searches the document for an element with the given id.
 boolean isHeadIncluded()
          Deprecated. now always returns true.
 

Method Detail

idExistsInDocument

boolean idExistsInDocument(String id)
Searches the document for an element with the given id.


getBodyElement

Element getBodyElement()
Returns the document <body> element.


getCharset

String getCharset()
Returns the character set currently in use by the document.


getReturnBodyOnly

String getReturnBodyOnly()
Obtains the value of the returnBodyOnly option. Only relevant when using the EditLive! applet (Swing SDK ignores this value).

Since EditLive! 8.0, this will only ever be "true" or "false". The "auto" setting is now handled in JavaScript.

Returns:
"true" or "false". Will always be"true" if running in the Swing SDK.

isHeadIncluded

@Deprecated
boolean isHeadIncluded()
Deprecated. now always returns true.


getElementNavigator

ElementNavigator getElementNavigator(Element element)
Creates an Element navigator for an element.


getElementInfo

ElementInfo getElementInfo(Element element)
Collects the Element info for an element.


getElementById

Element getElementById(String id)
Wrapper method to HTMLDocument.getElement(String).


getCharacterElement

Element getCharacterElement(int position)
Wrapper method to DefaultStyledDocument.getCharacterElement(int).


getParagraphElement

Element getParagraphElement(int position)
Wrapper method to DefaultStyledDocument.getParagraphElement(int).


getDocument

Document getDocument()
Wrapper method to JTextComponent.getDocument().


getTableManager

TableManager getTableManager()
Wrapper method to ELJBean.getTableManager().


getStyles

String getStyles()
Wrapper method to ELJBean.getStyles().


getDeclaredCustomTag

HTML.Tag getDeclaredCustomTag(String tagName)
Wrapper method to CustomTagController.getDeclaredCustomTag(String).


getBaseURL

String getBaseURL()
Wrapper method to ELJBean.getBaseURL().


Copyright (c) 2005-2013 Ephox Pty Ltd. All rights reserved.