info.magnolia.ui.form.field.definition
Class RichTextFieldDefinition

java.lang.Object
  extended by info.magnolia.ui.form.field.definition.ConfiguredFieldDefinition
      extended by info.magnolia.ui.form.field.definition.RichTextFieldDefinition
All Implemented Interfaces:
FieldDefinition

public class RichTextFieldDefinition
extends ConfiguredFieldDefinition

Field definition for a rich-text field.


Constructor Summary
RichTextFieldDefinition()
           
 
Method Summary
 String getColors()
          Defines the text colors that are allowed in this rich-text field.
 String getConfigJsFile()
          Defines the custom configuration file for this rich-text field.
 String getFonts()
          Defines the font families that are allowed in this rich-text field.
 String getFontSizes()
          Defines the font sizes that are allowed in this rich-text field.
 long getHeight()
          Defines the height of this rich-text field, in pixels.
 boolean isAlignment()
          Defines whether text alignment (left, center, right, justify) is allowed in this rich-text field.
 boolean isImages()
          Defines whether images are allowed in this rich-text field.
 boolean isLists()
          Defines whether lists are allowed in this rich-text field.
 boolean isSource()
          Defines whether source mode is allowed in this rich-text field.
 boolean isTables()
          Defines whether tables are allowed in this rich-text field.
 void setAlignment(boolean alignment)
           
 void setColors(String colors)
           
 void setConfigJsFile(String configJsFile)
           
 void setFonts(String fonts)
           
 void setFontSizes(String fontSizes)
           
 void setHeight(long height)
           
 void setImages(boolean images)
           
 void setLists(boolean lists)
           
 void setSource(boolean source)
           
 void setTables(boolean tables)
           
 
Methods inherited from class info.magnolia.ui.form.field.definition.ConfiguredFieldDefinition
addValidator, getConverterClass, getDefaultValue, getDescription, getI18nBasename, getLabel, getName, getRequiredErrorMessage, getStyleName, getTransformerClass, getType, getValidators, isI18n, isReadOnly, isRequired, setConverterClass, setDefaultValue, setDescription, setI18n, setI18nBasename, setLabel, setName, setReadOnly, setRequired, setRequiredErrorMessage, setStyleName, setTransformerClass, setType, setValidators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RichTextFieldDefinition

public RichTextFieldDefinition()
Method Detail

isAlignment

public boolean isAlignment()
Defines whether text alignment (left, center, right, justify) is allowed in this rich-text field.

Returns:
true if alignment is enabled, false otherwise. Defaults to false.

setAlignment

public void setAlignment(boolean alignment)

isImages

public boolean isImages()
Defines whether images are allowed in this rich-text field.

Returns:
true if images are enabled, false otherwise. Defaults to false.

setImages

public void setImages(boolean images)

isLists

public boolean isLists()
Defines whether lists are allowed in this rich-text field.

Returns:
true if lists are enabled, false otherwise. Defaults to true.

setLists

public void setLists(boolean lists)

isSource

public boolean isSource()
Defines whether source mode is allowed in this rich-text field.

Returns:
true if source mode is enabled, false otherwise. Defaults to false.

setSource

public void setSource(boolean source)

isTables

public boolean isTables()
Defines whether tables are allowed in this rich-text field.

Returns:
true if tables are enabled, false otherwise. Defaults to true.

setTables

public void setTables(boolean tables)

getHeight

public long getHeight()
Defines the height of this rich-text field, in pixels.


setHeight

public void setHeight(long height)

getColors

public String getColors()
Defines the text colors that are allowed in this rich-text field.

Returns:
a comma separated list of colors, as per CKEditor documentation (hexadecimal codes, without leading hash).
See Also:
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-colorButton_colors

setColors

public void setColors(String colors)

getFonts

public String getFonts()
Defines the font families that are allowed in this rich-text field.

Returns:
a semi-colon separated list of font names, as per CKEditor documentation.
See Also:
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-font_names

setFonts

public void setFonts(String fonts)

getFontSizes

public String getFontSizes()
Defines the font sizes that are allowed in this rich-text field.

Returns:
a semi-colon separated list of font sizes, as per CKEditor documentation (including CSS unit).
See Also:
http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-fontSize_sizes

setFontSizes

public void setFontSizes(String fontSizes)

getConfigJsFile

public String getConfigJsFile()
Defines the custom configuration file for this rich-text field.

Returns:
a path to the config JavaScript file, relative to context path.

setConfigJsFile

public void setConfigJsFile(String configJsFile)


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.