public class WysiwygConfigurationUpdate
extends java.lang.Object
WysiwygPolicyFilter.updateWysiwygConfiguration(String)
.public class MyBasicWysiwygPolicyFilter extends BasicWysiwygPolicyFilter { @Override public List<WysiwygConfigurationUpdate> updateWysiwygConfiguration(String configId) { List<WysiwygConfigurationUpdate> list = new ArrayList<WysiwygConfigurationUpdate>(); // Add a new toolbar item before the item 'undo' list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR_ITEM_BEFORE) .setData("item", "itembefore1").setData("item-before", "undo")); // Add a new toolbar item after the item 'undo' list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR_ITEM_AFTER) .setData("item", "itemafter1").setData("item-after", "undo")); if("config1".equals(configId)) { // Remove the item 'aligncenter' from the toolbar list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.REMOVE_TOOLBAR_ITEM).setData("item", "aligncenter")); } // Add a new toolbar at first list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR).setData("index", 0).setData("toolbar", "item1 item2 item3")); // Add a new toolbar at last list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR).setData("index", -1).setData("toolbar", "item7 item8 item9")); // Remove the second toolbar list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.REMOVE_TOOLBAR).setData("index", 1)); // Add new item group in the first toolbar at the beginning list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR_GROUP) .setData("index", 0).setData("toolbar-index", 0).setData("group", "newitem1 newitem2")); // Add new item group in the second toolbar at the index 2 (3rd position) list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.INSERT_TOOLBAR_GROUP) .setData("index", 2).setData("toolbar-index", 1).setData("group", "newitem3 newitem4")); // Remove the first item group from the first toolbar list.add(WysiwygConfigurationUpdate.newInstance(UpdateAction.REMOVE_TOOLBAR_GROUP).setData("index", 0).setData("toolbar-index", 0)); return list; } }
Modifier and Type | Class and Description |
---|---|
static class |
WysiwygConfigurationUpdate.UpdateAction
Enumeration of actions to update a WYSIWYG configuration.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getData(java.lang.String key) |
WysiwygConfigurationUpdate.UpdateAction |
getUpdateAction() |
static WysiwygConfigurationUpdate |
newInstance(WysiwygConfigurationUpdate.UpdateAction updateAction) |
static void |
removePlugin(java.lang.String plugin,
WysiwygConfiguration config) |
WysiwygConfigurationUpdate |
setData(java.lang.String key,
java.lang.Object value) |
public static WysiwygConfigurationUpdate newInstance(WysiwygConfigurationUpdate.UpdateAction updateAction)
public WysiwygConfigurationUpdate setData(java.lang.String key, java.lang.Object value)
public WysiwygConfigurationUpdate.UpdateAction getUpdateAction()
public <T> T getData(java.lang.String key)
public static void removePlugin(java.lang.String plugin, WysiwygConfiguration config)
Copyright © 2001-2018 Jalios SA. All Rights Reserved.