public class WysiwygMacroHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MACRO_CLASS |
static String |
MACRO_HAS_BODY_ATTRIBUTE |
static String |
MACRO_HAS_NEWLINE_AFTER_BODY_ATTRIBUTE |
static String |
MACRO_HAS_NEWLINE_BEFORE_BODY_ATTRIBUTE |
static String |
MACRO_HAS_PRECEDING_NEWLINE_ATTRIBUTE |
static String |
MACRO_HAS_TRAILING_NEWLINE_ATTRIBUTE |
static String |
MACRO_NAME_ATTRIBUTE |
static String |
MACRO_PADDING_CLASS
Deprecated.
use DefaultWysiwygConverter#PADDING_CLASS
|
static String |
MACRO_START_TAG_ATTRIBUTE |
static String |
MACRO_TAG_PARAM |
| Constructor and Description |
|---|
WysiwygMacroHelper(MacroRendererComponent macroRendererComponent) |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertMacroFromNode(NodeContext nodeContext,
DefaultWysiwygConverter defaultWysiwygConverter,
Macro macro)
Converts a macro node back to wiki markup.
|
static String |
getMacroName(Node node)
Retrieves the macro name from the given node.
|
static boolean |
isMacroBody(Node node)
Returns true if the node is a macro body node.
|
static boolean |
isMacroTag(Node node)
Returns true if the node is a macro body node.
|
void |
renderMacro(MacroTag startTag,
Macro macro,
String body,
Map<String,Object> params,
RenderContext context,
StringBuffer buffer)
Renders a macro with the given information and outputs the XHTML into the given buffer.
|
public static final String MACRO_TAG_PARAM
public static final String MACRO_CLASS
public static final String MACRO_NAME_ATTRIBUTE
public static final String MACRO_START_TAG_ATTRIBUTE
public static final String MACRO_HAS_BODY_ATTRIBUTE
public static final String MACRO_HAS_NEWLINE_BEFORE_BODY_ATTRIBUTE
public static final String MACRO_HAS_NEWLINE_AFTER_BODY_ATTRIBUTE
public static final String MACRO_HAS_PRECEDING_NEWLINE_ATTRIBUTE
public static final String MACRO_HAS_TRAILING_NEWLINE_ATTRIBUTE
public static final String MACRO_PADDING_CLASS
public WysiwygMacroHelper(MacroRendererComponent macroRendererComponent)
public void renderMacro(MacroTag startTag, Macro macro, String body, Map<String,Object> params, RenderContext context, StringBuffer buffer)
startTag - the start tag of the macromacro - the macro to render. Note that this could be null.body - the wiki markup body of the macro. This can also be null.params - a map of macro parameterscontext - the render context in which the macro is renderedbuffer - the buffer to which the rendered output is appendedpublic static String getMacroName(Node node)
public static boolean isMacroBody(Node node)
public static boolean isMacroTag(Node node)
public static String convertMacroFromNode(NodeContext nodeContext, DefaultWysiwygConverter defaultWysiwygConverter, Macro macro)
nodeContext - the context the node is currently indefaultWysiwygConverter - the converter that is calling this methodmacro - the macro that is being convertedCopyright © 2019 Atlassian. All rights reserved.