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 Details

    • Id

      public static final de.agilecoders.wicket.jquery.IKey<String> Id
  • Constructor Details

    • SummernoteConfig

      public SummernoteConfig()
  • Method Details

    • withAirMode

      public SummernoteConfig withAirMode(boolean airMode)
      Parameters:
      airMode - if air mode should be used or normal
      Returns:
      current instance
    • isAirMode

      public boolean isAirMode()
    • withDisableDragAndDrop

      public SummernoteConfig withDisableDragAndDrop(boolean disableDragAndDrop)
      Parameters:
      disableDragAndDrop - A flag to disable/enable the drag and drop support
      Returns:
      current instance
    • withShortcuts

      public SummernoteConfig withShortcuts(boolean shortcuts)
      Parameters:
      shortcuts - A flag to disable/enable the support for shortcuts
      Returns:
      current instance
    • withMaxHeight

      public SummernoteConfig withMaxHeight(Integer maxHeight)
      Parameters:
      maxHeight - the max height of the editor
      Returns:
      current instance
    • withMinHeight

      public SummernoteConfig withMinHeight(Integer minHeight)
      Parameters:
      minHeight - the min height of the editor
      Returns:
      current instance
    • withHeight

      public SummernoteConfig withHeight(Integer height)
      Parameters:
      height - the height of the editor
      Returns:
      current instance
    • withOverlayTimeout

      public SummernoteConfig withOverlayTimeout(Integer overlayTimeout)
      Parameters:
      overlayTimeout - the timeout until the overlay is shown
      Returns:
      current instance
    • force

      public SummernoteConfig force(boolean force)
      Parameters:
      force - if the editor should gain the focus
      Returns:
      current instance
    • withMaxFileSize

      public SummernoteConfig withMaxFileSize(int maxFileSize)
      Parameters:
      maxFileSize -
      Returns:
      current instance
    • getMaxFileSize

      public int getMaxFileSize()
      Gets the max file size
      Returns:
      the max file size
    • withImageUploadCallbackUrl

      public SummernoteConfig withImageUploadCallbackUrl(String callbackUrl)
      Parameters:
      callbackUrl - The image upload url to call back
      Returns:
      current instance
    • withPlaceholder

      public SummernoteConfig withPlaceholder(String placeholder)
      Parameters:
      placeholder - The placeholder text in the empty editor
      Returns:
      current instance
    • getStorage

      public static SummernoteStorage getStorage(String storageId)
      Gets the storage
      Parameters:
      storageId - the storage id;
      Returns:
      the storage
    • addStorage

      public static void addStorage(SummernoteStorage storage)
      Adds a summer note storage
      Parameters:
      storage - the storage to be added
    • getStorageId

      public String getStorageId()
      Gets the storage id
      Returns:
      the storage id
    • useStorageId

      public void useStorageId(String storageId)
      Tells the summernote editor which storage should be used
      Parameters:
      storageId - the storage id to be used
    • getButtons

      public List<String> getButtons(String category)
      Gets a list of button ids of the given category
      Parameters:
      category -
      Returns:
      a list of button ids
    • addButtons

      public void addButtons(String category, List<String> buttonIds)
      Adds buttons to the toolbar
      Parameters:
      category - the button category
      buttonIds - the ids of the buttons
    • removeButtons

      public void removeButtons(String category)
      Removes buttons of a given category
      Parameters:
      category - the category to remove buttons
    • getImageNamePrefix

      public String getImageNamePrefix()
      Override this method to provide a customized prefix images should be stored.
      Returns:
      a prefix for the image names to be stored