Class Markdown

  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWBaseElement
          extended by ariba.ui.aribaweb.core.AWBindableElement
              extended by ariba.ui.aribaweb.core.AWContainerElement
                  extended by ariba.ui.widgets.Markdown
All Implemented Interfaces:
AWBindable, AWCycleable, AWCycleableReference, AWElement, AWElementContaining, AWHtmlTemplateParser.FilterBody, AWHtmlTemplateParser.SupressesEmbeddedKeyPaths, AWVisitable, AWObject, java.lang.Cloneable

public class Markdown
extends AWContainerElement
implements AWHtmlTemplateParser.FilterBody, AWHtmlTemplateParser.SupressesEmbeddedKeyPaths

Support for the Markdown text->html format. See for info on the format, and for info on the java library we're wrapping here. This provides an AW tag that can be use as either: <w:Markdown> some text </w:Markdown> Or: <w:Markdown value="$someText"/> Our filtering of markdown is enhanced in the following ways: - leading indentation is stripped (i.e. the indentation level of the first non-whitespace line is used to determine the indentation level, and all lines are de-indented by that amount). - Code blocks are prettified (i.e. wrapped with <div class='quoteCode'><pre class='prettyprint'> ) - Convenient inner-document linking to headers - All headers are given an id matching their contents (with ws converted to _) - The format [Heading Text]# creates a hyperlink linking to that heading (i.e. it is converted to [Heading Text](#Heading_Text], which is then converted to <a href="#Heading_Text">Heading Text</a>

Field Summary
Fields inherited from class ariba.ui.aribaweb.util.AWBaseObject
AribaHashtableClass, AribaVectorClass, ClassClass, EmptyHashtable, EmptyMap, EmptyVector, False, IntegerClass, JavaHashtableClass, JavaMapClass, JavaVectorClass, LogHandling, NullObject, ObjectClass, StringClass, True, UndefinedObject, UndefinedString, UninitializedRealNumber
Constructor Summary
Method Summary
 java.lang.String filterBody(java.lang.String body)
 void init(java.lang.String tagName, java.util.Map bindingsHashtable)
 void renderResponse(AWRequestContext requestContext, AWComponent component)
          The receiver should render its content to the AWRequestContext.response()
static java.lang.String translateMarkdown(java.lang.String text)
Methods inherited from class ariba.ui.aribaweb.core.AWContainerElement
add, appendTo, applyValues, contentElement, continueVisit, invokeAction, setContentElement, validate
Methods inherited from class ariba.ui.aribaweb.core.AWBindableElement
allBindings, determineInstance, tagName
Methods inherited from class ariba.ui.aribaweb.core.AWBaseElement
bareStringContent, clone, determineInstance, lineNumber, setLineNumber, setTemplateName, startVisit, templateName, toString
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject
debugString, ensureFieldValuesClear, getFieldValue, init, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ariba.ui.aribaweb.core.AWElement
Methods inherited from interface ariba.ui.aribaweb.core.AWCycleableReference
Methods inherited from interface ariba.ui.aribaweb.util.AWObject
getFieldValue, init, isKindOfClass, setFieldValue
Methods inherited from interface ariba.ui.aribaweb.core.AWVisitable

Constructor Detail


public Markdown()
Method Detail


public static java.lang.String translateMarkdown(java.lang.String text)


public void init(java.lang.String tagName,
                 java.util.Map bindingsHashtable)
Specified by:
init in interface AWBindable
init in class AWBindableElement


public java.lang.String filterBody(java.lang.String body)
Specified by:
filterBody in interface AWHtmlTemplateParser.FilterBody


public void renderResponse(AWRequestContext requestContext,
                           AWComponent component)
Description copied from interface: AWCycleable
The receiver should render its content to the AWRequestContext.response()

Specified by:
renderResponse in interface AWCycleable
renderResponse in class AWContainerElement
requestContext - the context for the current request.
component - the current parent component

AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.