Module wicket.bootstrap.extensions
Class SummernoteConfig
java.lang.Object
de.agilecoders.wicket.jquery.CombinableConfig
de.agilecoders.wicket.jquery.AbstractConfig
de.agilecoders.wicket.extensions.markup.html.bootstrap.editor.SummernoteConfig
- All Implemented Interfaces:
de.agilecoders.wicket.jquery.Config,Serializable,IClusterable
public class SummernoteConfig
extends de.agilecoders.wicket.jquery.AbstractConfig
Provides config information for the summernote editor
- Author:
- Tobias Soloschenko
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButtons(String category, List<String> buttonIds) Adds buttons to the toolbarstatic voidaddStorage(SummernoteStorage storage) Adds a summer note storageforce(boolean force) getButtons(String category) Gets a list of button ids of the given categoryOverride this method to provide a customized prefix images should be stored.intGets the max file sizestatic SummernoteStoragegetStorage(String storageId) Gets the storageGets the storage idbooleanvoidremoveButtons(String category) Removes buttons of a given categoryvoiduseStorageId(String storageId) Tells the summernote editor which storage should be usedwithAirMode(boolean airMode) withDisableDragAndDrop(boolean disableDragAndDrop) withHeight(Integer height) withImageUploadCallbackUrl(String callbackUrl) withMaxFileSize(int maxFileSize) withMaxHeight(Integer maxHeight) withMinHeight(Integer minHeight) withOverlayTimeout(Integer overlayTimeout) withPlaceholder(String placeholder) withShortcuts(boolean shortcuts) Methods inherited from class de.agilecoders.wicket.jquery.AbstractConfig
all, contains, get, getString, isEmpty, newKey, put, remove, toJsonString, wrapMethods inherited from class de.agilecoders.wicket.jquery.CombinableConfig
combine, withFallback
-
Field Details
-
Id
-
-
Constructor Details
-
SummernoteConfig
public SummernoteConfig()
-
-
Method Details
-
withAirMode
- Parameters:
airMode- if air mode should be used or normal- Returns:
- current instance
-
isAirMode
public boolean isAirMode() -
withDisableDragAndDrop
- Parameters:
disableDragAndDrop- A flag to disable/enable the drag and drop support- Returns:
- current instance
-
withShortcuts
- Parameters:
shortcuts- A flag to disable/enable the support for shortcuts- Returns:
- current instance
-
withMaxHeight
- Parameters:
maxHeight- the max height of the editor- Returns:
- current instance
-
withMinHeight
- Parameters:
minHeight- the min height of the editor- Returns:
- current instance
-
withHeight
- Parameters:
height- the height of the editor- Returns:
- current instance
-
withOverlayTimeout
- Parameters:
overlayTimeout- the timeout until the overlay is shown- Returns:
- current instance
-
force
- Parameters:
force- if the editor should gain the focus- Returns:
- current instance
-
withMaxFileSize
- Parameters:
maxFileSize-- Returns:
- current instance
-
getMaxFileSize
public int getMaxFileSize()Gets the max file size- Returns:
- the max file size
-
withImageUploadCallbackUrl
- Parameters:
callbackUrl- The image upload url to call back- Returns:
- current instance
-
withPlaceholder
- Parameters:
placeholder- The placeholder text in the empty editor- Returns:
- current instance
-
getStorage
Gets the storage- Parameters:
storageId- the storage id;- Returns:
- the storage
-
addStorage
Adds a summer note storage- Parameters:
storage- the storage to be added
-
getStorageId
Gets the storage id- Returns:
- the storage id
-
useStorageId
Tells the summernote editor which storage should be used- Parameters:
storageId- the storage id to be used
-
getButtons
Gets a list of button ids of the given category- Parameters:
category-- Returns:
- a list of button ids
-
addButtons
Adds buttons to the toolbar- Parameters:
category- the button categorybuttonIds- the ids of the buttons
-
removeButtons
Removes buttons of a given category- Parameters:
category- the category to remove buttons
-
getImageNamePrefix
Override this method to provide a customized prefix images should be stored.- Returns:
- a prefix for the image names to be stored
-