org.olat.core.commons.editor.htmleditor
Class HTMLEditorController

java.lang.Object
  extended by org.olat.core.gui.control.DefaultController
      extended by org.olat.core.gui.control.controller.BasicController
          extended by org.olat.core.gui.components.form.flexible.impl.FormBasicController
              extended by org.olat.core.commons.editor.htmleditor.HTMLEditorController
All Implemented Interfaces:
Controller, ControllerEventListener, Disposable

public class HTMLEditorController
extends FormBasicController

Description:
The HTMLEditorController provides a full-fledged WYSIWYG HTML editor with support for media and link browsing based on a VFS item. The editor will keep any header information such as references to CSS or JS files, but those will not be active while editing the file.

Keep in mind that this editor might be destructive when editing files that have been created with an external, more powerful editor.

Use the WYSIWYGFactory to create an instance.

Initial Date: 08.05.2009

Author:
gnaegi

Field Summary
 
Fields inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
LAYOUT_CUSTOM, LAYOUT_DEFAULT, LAYOUT_HORIZONTAL, LAYOUT_VERTICAL
 
Method Summary
 RichTextConfiguration getRichTextConfiguration()
          Get the rich text config object.
 boolean isNewFile()
           
 void setCancelButtonEnabled(boolean buttonEnabled)
          Optional configuration option to display the cancel button below the HTML editor form.
 void setNewFile(boolean newFile)
           
 void setSaveButtonEnabled(boolean buttonEnabled)
          Optional configuration option to display the save button below the HTML editor form.
 void setSaveCloseButtonEnabled(boolean buttonEnabled)
          Optional configuration option to display the save-and-close button below the HTML editor form.
 void setShowMetadataEnabled(boolean metadataEnabled)
          Optional configuration to show the file name, file encoding and last modified date in a header bar.
 
Methods inherited from class org.olat.core.gui.components.form.flexible.impl.FormBasicController
dispose, event
 
Methods inherited from class org.olat.core.gui.control.DefaultController
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

setSaveButtonEnabled

public void setSaveButtonEnabled(boolean buttonEnabled)
Optional configuration option to display the save button below the HTML editor form. This will not disable the save button in the tinyMCE bar (if available). Default: true

Parameters:
buttonEnabled - true: show save button; false: hide save button

setSaveCloseButtonEnabled

public void setSaveCloseButtonEnabled(boolean buttonEnabled)
Optional configuration option to display the save-and-close button below the HTML editor form. This will not disable the save button in the tinyMCE bar (if available). Default: true

Parameters:
buttonEnabled - true: show save-and-close button; false: hide save-and-close button

setCancelButtonEnabled

public void setCancelButtonEnabled(boolean buttonEnabled)
Optional configuration option to display the cancel button below the HTML editor form. This will not disable the cancel button in the tinyMCE bar (if available). Default: true

Parameters:
buttonEnabled - true: show cancel button; false: hide cancel button

setShowMetadataEnabled

public void setShowMetadataEnabled(boolean metadataEnabled)
Optional configuration to show the file name, file encoding and last modified date in a header bar. Default: true

Parameters:
metadataEnabled - true: show metadata; false: hide metadata

getRichTextConfiguration

public RichTextConfiguration getRichTextConfiguration()
Get the rich text config object. This can be used to fine-tune the editor features, e.g. to enable additional buttons or to remove available buttons

Returns:

isNewFile

public boolean isNewFile()

setNewFile

public void setNewFile(boolean newFile)