CQ5 enabling selective plugin features via API
Hi,
I'm enabling the RTE plugins using the API. So I enabled the EditToolsPlugin as below:
JSONObject editPlugin = new JSONObject(); editPlugin.put(JcrConstants.JCR_PRIMARYTYPE, JcrConstants.NT_UNSTRUCTURED); editPlugin.put("features", "*"); rtePlugins.put("edit", editPlugin);When I access the dialog I have all the edit functions/icons displayed. However I need to set the features to paste-plaintext as thats the only option I require from the plugin. I've tried change the feature code line to a number of combinations from String to String Arrays.
- editPlugin.put("features", "paste-plaintext");
- editPlugin.put("features", editPlugin.put("features", new String[]{"paste-plaintext"});
- private String[] features = {"paste-plaintext"};
editPlugin.put("features", features);
None of these appear to work. The API for the plugin does say "You may provide a String value of "*" to enable all features of the respective plugin, or provide a String[] that contains the IDs of active features" .... so what does it mean for "active features" and is this relevant?
I've probably missed or not done something but any assistance to resolve this is appreciated
Thanks....Gary