//
return getPluginName();
}
WikiContext context = doc.getContext();
Boolean wysiwygVariable = (Boolean) context.getVariable(RenderingManager.WYSIWYG_EDITOR_MODE);
boolean wysiwygEditorMode = false;
if (wysiwygVariable != null) {
wysiwygEditorMode = wysiwygVariable.booleanValue();
}
try {
//
// Determine whether we should emit the actual code for this plugin or
// whether we should execute it. For some plugins we always execute it,
// since they can be edited visually.
//
// FIXME: The plugin name matching should not be done here, but in a per-editor resource
if (wysiwygEditorMode && !m_pluginName.matches(EMITTABLE_PLUGINS)) {
result = PLUGIN_START + m_pluginName + SPACE;
// convert newlines to <br> in case the plugin has a body.
String cmdLine = (m_params.get(CMDLINE)).replaceAll(LINEBREAK, ELEMENT_BR);
result = result + cmdLine + PLUGIN_END;
} else {
Boolean b = (Boolean) context.getVariable(RenderingManager.VAR_EXECUTE_PLUGINS);
if (b != null && !b.booleanValue()) {
return BLANK;
}
WikiEngine engine = context.getEngine();
Map<String, String> parsedParams = new HashMap<String, String>();
//
// Parse any variable instances from the string