|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.renderer.v2.macro.BaseMacro
com.atlassian.renderer.v2.macro.basic.InlineHtmlMacro
public class InlineHtmlMacro
A macro to include verbatim HTML in a page. DO NOT enable this macro on sites where you do not trust your users absolutely, as it opens you up to a world of pain (and cross-site scripting security issues)
| Field Summary |
|---|
| Fields inherited from interface com.atlassian.renderer.v2.macro.Macro |
|---|
RAW_PARAMS_KEY |
| Constructor Summary | |
|---|---|
InlineHtmlMacro()
|
|
| Method Summary | |
|---|---|
String |
convertXhtmlToWikiMarkup(NodeContext nodeContext,
WysiwygConverter wysiwygConverter)
Returns the converted wiki markup of the macro body from the given node context. |
String |
execute(Map parameters,
String body,
RenderContext renderContext)
Execute the macro. |
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. |
boolean |
suppressMacroRenderingDuringWysiwyg()
Render the HTML. |
boolean |
suppressSurroundingTagDuringWysiwygRendering()
This class used to suppress surrounding tags, but now uses them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InlineHtmlMacro()
| Method Detail |
|---|
public boolean isInline()
MacroMost macros will want to return false here.
isInline in interface Macropublic boolean hasBody()
Macro
hasBody in interface Macropublic RenderMode getBodyRenderMode()
MacroIf 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.
getBodyRenderMode in interface Macro
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()
execute in interface Macroparameters - the parameters included in the macrobody - the content of the body of the macrorenderContext - the rendering context in which the macro was executed
MacroException - 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 String convertXhtmlToWikiMarkup(NodeContext nodeContext,
WysiwygConverter wysiwygConverter)
MacroBodyConverter
convertXhtmlToWikiMarkup in interface MacroBodyConverterpublic boolean suppressSurroundingTagDuringWysiwygRendering()
suppressSurroundingTagDuringWysiwygRendering in interface MacrosuppressSurroundingTagDuringWysiwygRendering in class BaseMacropublic boolean suppressMacroRenderingDuringWysiwyg()
suppressMacroRenderingDuringWysiwyg in interface MacrosuppressMacroRenderingDuringWysiwyg in class BaseMacro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||