adding html ordered list example with starting position
- showcases the existing bug
This commit is contained in:
parent
2ea148c30a
commit
c8ceb6c467
@ -39,6 +39,19 @@
|
|||||||
"image"
|
"image"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"javaClassName": "io.noties.markwon.app.samples.html.HtmlOrderedListNumbersSample",
|
||||||
|
"id": "20210201140502",
|
||||||
|
"title": "HTML Ordered list numbers",
|
||||||
|
"description": "",
|
||||||
|
"artifacts": [
|
||||||
|
"HTML"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"rendering",
|
||||||
|
"html"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"javaClassName": "io.noties.markwon.app.samples.html.InspectHtmlTextSample",
|
"javaClassName": "io.noties.markwon.app.samples.html.InspectHtmlTextSample",
|
||||||
"id": "20210201140501",
|
"id": "20210201140501",
|
||||||
|
@ -0,0 +1,35 @@
|
|||||||
|
package io.noties.markwon.app.samples.html;
|
||||||
|
|
||||||
|
import io.noties.markwon.Markwon;
|
||||||
|
import io.noties.markwon.app.sample.ui.MarkwonTextViewSample;
|
||||||
|
import io.noties.markwon.html.HtmlPlugin;
|
||||||
|
import io.noties.markwon.sample.annotations.MarkwonArtifact;
|
||||||
|
import io.noties.markwon.sample.annotations.MarkwonSampleInfo;
|
||||||
|
import io.noties.markwon.sample.annotations.Tag;
|
||||||
|
|
||||||
|
@MarkwonSampleInfo(
|
||||||
|
id = "20210201140502",
|
||||||
|
title = "HTML Ordered list numbers",
|
||||||
|
artifacts = MarkwonArtifact.HTML,
|
||||||
|
tags = {Tag.rendering, Tag.html}
|
||||||
|
)
|
||||||
|
public class HtmlOrderedListNumbersSample extends MarkwonTextViewSample {
|
||||||
|
@Override
|
||||||
|
public void render() {
|
||||||
|
final String md = "# HTML Ordered lists\n\n" +
|
||||||
|
"<ol start=\"7\">" +
|
||||||
|
" <li>July</li>\n" +
|
||||||
|
" <li>August</li>\n" +
|
||||||
|
" <li>September</li>\n" +
|
||||||
|
" <li>October</li>\n" +
|
||||||
|
" <li>November</li>\n" +
|
||||||
|
" <li>December</li>\n" +
|
||||||
|
"</ol>\n" +
|
||||||
|
"";
|
||||||
|
|
||||||
|
final Markwon markwon = Markwon.builder(context)
|
||||||
|
.usePlugin(HtmlPlugin.create())
|
||||||
|
.build();
|
||||||
|
markwon.setMarkdown(textView, md);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user