Enum Class CKEditorPreset
- All Implemented Interfaces:
Serializable, Comparable<CKEditorPreset>, Constable
CKEditor preset configurations.
Provides common plugin combinations for quick setup.
Usage example:
// Use a preset
VaadinCKEditor.create()
.withPreset(CKEditorPreset.STANDARD)
.build();
// Customize based on preset
VaadinCKEditor.create()
.withPreset(CKEditorPreset.BASIC)
.addPlugin(CKEditorPlugin.TABLE)
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBasic preset (~300KB) Suitable for simple text input, commentsCollaborative preset (requires Premium license) Base configuration for collaborative editing with Comments, Track Changes, and Revision History.Document preset (~800KB) Suitable for professional document editingEmpty preset For fully custom configurationFull preset (~700KB) Suitable for complete document processing Optimized for fast loading (~40 plugins)Standard preset (~600KB) Suitable for general document editing, blogs -
Method Summary
Modifier and TypeMethodDescriptionString[]Get default toolbar configurationGet display nameintGet estimated bundle size (KB).Get plugins included in this presetbooleanhasPlugin(CKEditorPlugin plugin) Check if preset includes a specific pluginstatic CKEditorPresetReturns the enum constant of this class with the specified name.static CKEditorPreset[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BASIC
Basic preset (~300KB) Suitable for simple text input, comments -
STANDARD
Standard preset (~600KB) Suitable for general document editing, blogs -
FULL
Full preset (~700KB) Suitable for complete document processing Optimized for fast loading (~40 plugins) -
DOCUMENT
Document preset (~800KB) Suitable for professional document editing -
COLLABORATIVE
Collaborative preset (requires Premium license) Base configuration for collaborative editing with Comments, Track Changes, and Revision History.Important: This preset only includes the base plugins. You must add the collaboration plugins separately using
CustomPlugin.fromPremium():// Asynchronous collaboration (Comments, Track Changes) VaadinCKEditor editor = VaadinCKEditor.create() .withPreset(CKEditorPreset.COLLABORATIVE) .withLicenseKey("your-license-key") .addCustomPlugin(CustomPlugin.fromPremium("Comments")) .addCustomPlugin(CustomPlugin.fromPremium("TrackChanges")) .addCustomPlugin(CustomPlugin.fromPremium("RevisionHistory")) .build(); // Real-time collaboration (requires CKEditor Cloud Services) VaadinCKEditor editor = VaadinCKEditor.create() .withPreset(CKEditorPreset.COLLABORATIVE) .withLicenseKey("your-license-key") .addCustomPlugin(CustomPlugin.fromPremium("RealTimeCollaborativeEditing")) .addCustomPlugin(CustomPlugin.fromPremium("RealTimeCollaborativeComments")) .addCustomPlugin(CustomPlugin.fromPremium("PresenceList")) .withConfig(config -> config .set("cloudServices.tokenUrl", "https://your-server/token") .set("collaboration.channelId", "document-123") ) .build();Available collaboration plugins:
- Comments - Add comments to document fragments
- TrackChanges - Track all changes as suggestions
- RevisionHistory - Document version control
- RealTimeCollaborativeEditing - Real-time co-editing
- RealTimeCollaborativeComments - Real-time comments sync
- RealTimeCollaborativeTrackChanges - Real-time track changes sync
- RealTimeCollaborativeRevisionHistory - Real-time revision sync
- PresenceList - Show connected users
- See Also:
-
EMPTY
Empty preset For fully custom configuration
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getDisplayName
Get display name -
getPlugins
Get plugins included in this preset -
getDefaultToolbar
Get default toolbar configuration -
hasPlugin
Check if preset includes a specific plugin -
getEstimatedSize
public int getEstimatedSize()Get estimated bundle size (KB). Note: These are approximate values based on typical builds. Actual size depends on webpack/vite configuration and tree-shaking.
-