Class RichTextEditorConfiguration
java.lang.Object
org.eclipse.nebula.widgets.richtext.RichTextEditorConfiguration
Configuration class that is used for general configurations of the CKEditor instance.
- Since:
- 3.2
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringKey for the default language configuration.static final StringKey for the language configuration.static final StringKey for toolbar buttons that should not be rendered.static final StringKey to configure whether the toolbar can be collapsed by the user.static final StringKey for toolbar groups configuration.static final StringKey to configure whether the toolbar must start expanded when the editor is loaded.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new instance for general configurations that are added to the created CKEditor instance at initialization.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDefaultToolbarButton(String... buttonNames) Adds the CKEditor default button for the given name to the toolbar.Returns a configuration option set in thisRichTextEditorConfiguration.voidremoveDefaultToolbarButton(String... buttonNames) Removes the CKEditor default button for the given name from the toolbar.voidsetDefaultLanguage(String lang) voidsetDefaultLanguage(Locale locale) voidsetLanguage(String lang) voidsetLanguage(Locale locale) voidAdds a new option to the configuration.voidsetRemoveFormat(boolean removeFormat) voidsetRemovePasteFromWord(boolean removePasteFromWord) voidsetRemovePasteText(boolean removePasteText) voidsetRemoveStyles(boolean removeStyles) voidsetToolbarCollapsible(boolean toolbarCollapsible) Configure if the toolbar should be collapsible.voidsetToolbarInitialExpanded(boolean toolbarInitialExpanded) Configure if the toolbar should be initially expanded.
- 
Field Details- 
DEFAULT_LANGUAGEKey for the default language configuration.- See Also:
 
- 
LANGUAGEKey for the language configuration.- See Also:
 
- 
TOOLBAR_GROUPSKey for toolbar groups configuration.- See Also:
 
- 
REMOVE_BUTTONSKey for toolbar buttons that should not be rendered.- See Also:
 
- 
TOOLBAR_CAN_COLLAPSEKey to configure whether the toolbar can be collapsed by the user.- See Also:
 
- 
TOOLBAR_STARTUP_EXPANDEDKey to configure whether the toolbar must start expanded when the editor is loaded.- See Also:
 
 
- 
- 
Constructor Details- 
RichTextEditorConfigurationpublic RichTextEditorConfiguration()Creates a new instance for general configurations that are added to the created CKEditor instance at initialization.
 
- 
- 
Method Details- 
setOptionAdds a new option to the configuration.- Parameters:
- key- The configuration option key.
- value- The configuration option value.
- See Also:
 
- 
getOptionReturns a configuration option set in thisRichTextEditorConfiguration.- Parameters:
- key- The configuration option key for which the value is requested.
- Returns:
- The configuration option value for the given key or nullin case there is nothing configured for that key.
 
- 
getAllOptions- Returns:
- An unmodifiable map that contains all configuration option values.
 
- 
setLanguage- Parameters:
- lang- The user interface language localization to use. If left empty, the editor will automatically be localized to the user language. If the user language is not supported, the language specified in the defaultLanguage configuration setting is used.
 
- 
setLanguage- Parameters:
- locale- The user interface language localization to use. If left empty, the editor will automatically be localized to the user language. If the user language is not supported, the language specified in the defaultLanguage configuration setting is used.
 
- 
setDefaultLanguage- Parameters:
- lang- The language to be used if the language setting is left empty and it is not possible to localize the editor to the user language.
 
- 
setDefaultLanguage- Parameters:
- locale- The language to be used if the language setting is left empty and it is not possible to localize the editor to the user language.
 
- 
setRemovePasteTextpublic void setRemovePasteText(boolean removePasteText) - Parameters:
- removePasteText-- trueto remove the paste text button from the toolbar.
 
- 
setRemovePasteFromWordpublic void setRemovePasteFromWord(boolean removePasteFromWord) - Parameters:
- removePasteFromWord-- trueto remove the paste from word button from the toolbar.
 
- 
setRemoveStylespublic void setRemoveStyles(boolean removeStyles) - Parameters:
- removeStyles-- trueto remove the styles combo box from the toolbar.
 
- 
setRemoveFormatpublic void setRemoveFormat(boolean removeFormat) - Parameters:
- removeFormat-- trueto remove format combo box from the toolbar.
 
- 
addDefaultToolbarButtonAdds the CKEditor default button for the given name to the toolbar.Note: This works only for buttons that have been removed using removeDefaultToolbarButton(String[])- Parameters:
- buttonNames- The names of the CKEditor default button to add.
 
- 
removeDefaultToolbarButtonRemoves the CKEditor default button for the given name from the toolbar.- Parameters:
- buttonNames- The names of the CKEditor default button to remove.
 
- 
setToolbarCollapsiblepublic void setToolbarCollapsible(boolean toolbarCollapsible) Configure if the toolbar should be collapsible. Default isfalse.- Parameters:
- toolbarCollapsible-- trueif the toolbar should be collapsible,- falseif not.
 
- 
setToolbarInitialExpandedpublic void setToolbarInitialExpanded(boolean toolbarInitialExpanded) Configure if the toolbar should be initially expanded. Default istrue.- Parameters:
- toolbarInitialExpanded-- trueif the toolbar should be initially expanded,- falseif not.
 
 
-