RAW_PARAMS_KEY| Constructor and Description |
|---|
BasicAnchorMacro() |
| Modifier and Type | Method and Description |
|---|---|
String |
execute(Map parameters,
String body,
RenderContext renderContext)
Execute the macro.
|
static String |
getAnchor(RenderContext context,
String body) |
RenderMode |
getBodyRenderMode()
If the macro has a body, return the mode in which the body of the macro
should be rendered.
|
boolean |
hasBody()
Determine if the macro is a one-shot macro, or one that takes a body.
|
boolean |
isInline()
Determine if the macro is an "inline" element in the resulting HTML.
|
getTokenType, getWysiwygBodyType, suppressMacroRenderingDuringWysiwyg, suppressSurroundingTagDuringWysiwygRenderingpublic boolean isInline()
BaseMacro
Most macros will want to return false here.
The default implementation now returns false, which has been a defacto default previously.
public boolean hasBody()
Macropublic RenderMode getBodyRenderMode()
Macro
If this method returns null, it causes the macro processor to treat the macro as one that returns wiki-text rather than HTML. The body of the macro will be passed in un-rendered, and the macro's output will be inserted back into the page for further normal processing by the wiki-engine.
public String execute(Map parameters, String body, RenderContext renderContext) throws MacroException
MacroMacro.getBodyRenderMode()).
Macros are expected to output HTML. The output of macros will not be subjected to any
further processing by the wiki-engine. If your macro produces wiki-text, you are responsible
for rendering that text to HTML yourself using a SubRenderer
or WikiStyleRenderer. If your macro returns pure wiki-text, you
can force further processing in the normal chain by returning null from Macro.getBodyRenderMode()
parameters - the parameters included in the macrobody - the content of the body of the macrorenderContext - the rendering context in which the macro was executedMacroException - if the macro fails in some unremarkable way. If the
macro fails in a way that is important to the server maintainer
(i.e. something is badly wrong), throw a RuntimeException instead.public static String getAnchor(RenderContext context, String body)
Copyright © 2019 Atlassian. All rights reserved.