Theme

WARNING

This is documentation for legacy versions. For the most current version click here.

Here is the list of properties that can be configured via SpannableTheme. If you wish to control what is out of this list, you can use SpannableFactory abstraction which lets you to gather full control of Spans that are used to display markdown.

  • SpannableTheme#create(Context) - creates a default instance of `SpannableBuilder (with defaults registered)
  • SpannableTheme#builder - creates empty builder with no defaults registered
  • SpannableTheme#builderWithDefaults(Context) - create a default instance of builder (with default values registered)

WARNING

SpannbleTheme#builder method has an unfortunate naming. It should've been emptyBuilder or builderNoDefaults because #builder method returns a builder with no default theme values registered. To create a builder with default values registered use SpannableBuilder#builderWithDefaults(Context)

Controls the color of a link

namelinkColor
type@ColorInt int
defaultDefault link color of a context where markdown is displayed *

* TextPaint#linkColor will be used to determine linkColor of a context

Block margin

Starting margin before text content for the:

  • lists
  • blockquotes
  • task lists
nameblockMargin
type@Px int
default24dp

Block quote

Customizations for the blockquote stripe

Quote

Stripe width

Width of a blockquote stripe

nameblockQuoteWidth
type@Px int
default1/4 of the block margin

Stripe color

Color of a blockquote stripe

nameblockQuoteColor
type@ColorInt int
defaulttextColor with 25 (0-255) alpha value

List

List item color

Controls the color of a list item. For ordered list: leading number, for unordered list: bullet.

  • UL
  1. OL
namelistItemColor
type@ColorInt int
defaultText color

Bullet item stroke width

Border width of a bullet list item (level 2)

  • First
    • Second
      • Third
namebulletListItemStrokeWidth
type@Px int
defaultStroke width of TextPaint

Bullet width

The width of the bullet item

  • First
    • Second
      • Third
namebulletWidth
type@Px int
defaultmin(blockMargin, lineHeight) / 2

Code

Inline code text color

The color of the code content

namecodeTextColor
type@ColorInt int
defaultContent text color

Inline code background color

The color of background of a code content

namecodeBackgroundColor
type@ColorInt int
defaultinline code text color with 25 (0-255) alpha

Block code text color

The color of code block text
namecodeBlockTextColor
type@ColorInt int
defaultinline code text color

Block code background color

The color of background of code block text
namecodeBlockBackgroundColor
type@ColorInt int
defaultinline code background color

Block code leading margin

Leading margin for the block code content

namecodeMultilineMargin
type@Px int
default8dip

Code typeface

Typeface of code content

namecodeTypeface
typeandroid.graphics.Typeface
defaultTypeface.MONOSPACE

Code text size

Text size of code content

namecodeTextSize
type@Px int
default(Content text size) * 0.87 if no custom Typeface was set, otherwise (content text size)

Heading

Break height

The height of a brake under H1 & H2

nameheadingBreakHeight
type@Px int
defaultStroke width of context TextPaint

Break color

The color of a brake under H1 & H2

nameheadingBreakColor
type@ColorInt int
default(text color) with 75 (0-255) alpha

Typeface 1.1.0

The typeface of heading elements

nameheadingTypeface
typeandroid.graphics.Typeface
defaultdefault text Typeface

Text size 1.1.0

Array of heading text sizes ratio that is applied to text size

nameheadingTextSizeMultipliers
typefloat[]
default{2.F, 1.5F, 1.17F, 1.F, .83F, .67F} (HTML spec)

Script ratio

Ratio to be applied for sup (super script) & sub (sub script)

namescriptTextSizeRatio
typefloat
default0.75F

Thematic break

Color

Color of a thematic break

namethematicBreakColor
type@ColorInt int
default(text color) with 25 (0-255) alpha

Height

Height of a thematic break

namethematicBreakHeight
type@Px int
defaultStroke width of context TextPaint

Table

Cell padding

Padding inside a table cell

nametableCellPadding
type@Px int
default0

Border color

The color of table borders

nametableBorderColor
type@ColorInt int
default(text color) with 75 (0-255) alpha

Border width

The width of table borders

nametableBorderWidth
type@Px int
defaultStroke with of context TextPaint

Odd row background

Background of an odd table row

nametableOddRowBackgroundColor
type@ColorInt int
default(text color) with 22 (0-255) alpha

Even row background 1.1.1

Background of an even table row

nametableEventRowBackgroundColor
type@ColorInt int
default0

Header row background 1.1.1

Background of header table row

nametableHeaderRowBackgroundColor
type@ColorInt int
default0

Task list drawable 1.0.1

Drawable of task list item

nametaskListDrawable
typeandroid.graphics.drawable.Drawable
defaultru.noties.markwon.spans.TaskListDrawable
Last Updated: 6/17/2019, 2:08:33 PM