## com.imcode.imcms.api
Class TextDocumentViewing

    java.lang.Object
      com.imcode.imcms.api.TextDocumentViewing

    public class TextDocumentViewing

extends java.lang.Object

An instance of this class is fetchable in JSPs included in text documents (with <?imcms:include path="..."?>) via `fromRequest(javax.servlet.http.HttpServletRequest)`, and in velocity code in text templates as `$viewing`.

Since:
  2.0

Constructor Summary
`TextDocumentViewing(ParserParameters parserParameters)`

Method Summary
`static TextDocumentViewing` `fromRequest(javax.servlet.http.HttpServletRequest request)`
`java.lang.Integer` `getEditedMenuIndex()`
`TextDocument` `getTextDocument()`
`boolean` `isEditing()`
`boolean` `isEditingImages()`
`boolean` `isEditingIncludes()`
`boolean` `isEditingMenus()`
`boolean` `isEditingTemplate()`
`boolean` `isEditingTexts()`
`static TextDocumentViewing` `putInRequest(TextDocumentViewing viewing)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextDocumentViewing

    public TextDocumentViewing(ParserParameters parserParameters)

Method Detail

### fromRequest

    public static TextDocumentViewing fromRequest(javax.servlet.http.HttpServletRequest request)

### getTextDocument

    public TextDocument getTextDocument()

### isEditing

    public boolean isEditing()

### isEditingTexts

    public boolean isEditingTexts()

### isEditingImages

    public boolean isEditingImages()

### isEditingMenus

    public boolean isEditingMenus()

### isEditingIncludes

    public boolean isEditingIncludes()

### isEditingTemplate

    public boolean isEditingTemplate()

### getEditedMenuIndex

    public java.lang.Integer getEditedMenuIndex()

  Returns:
    The index of the menu currently being edited, or null if none.

### putInRequest

    public static TextDocumentViewing putInRequest(TextDocumentViewing viewing)