开源软件名称(OpenSource Name):noties/Markwon开源软件地址(OpenSource Url):https://github.com/noties/Markwon开源编程语言(OpenSource Language):Java 92.0%开源软件介绍(OpenSource Introduction):MarkwonMarkwon is a markdown library for Android. It parses markdown following commonmark-spec with the help of amazing commonmark-java library and renders result as Android-native Spannables. No HTML is involved as an intermediate step. No WebView is required. It's extremely fast, feature-rich and extensible. It gives ability to display markdown in all TextView widgets (TextView, Button, Switch, CheckBox, etc), Toasts and all other places that accept Spanned content. Library provides reasonable defaults to display style of a markdown content but also gives all the means to tweak the appearance if desired. All markdown features listed in commonmark-spec are supported (including support for inlined/block HTML code, markdown tables, images and syntax highlight).
Since version 4.2.0 Markwon comes with an editor to highlight markdown input as user types (for example in EditText). Installationimplementation "io.noties.markwon:core:${markwonVersion}" Full list of available artifacts is present in the install section of the documentation web-site. Please visit documentation web-site for further reference.
Supported markdown features:
ScreenshotsTaken with default configuration (except for image loading) in sample app: By default configuration uses TextView textColor for styling, so changing textColor changes style DocumentationPlease visit documentation web-site for reference ConsultingPaid consulting is available. Please reach me out at markwon+consulting[at]noties.io to discuss your idea or a project DemoBased on this cheatsheet HeadersHeader 1Header 2Header 3Header 4Header 5Header 6EmphasisEmphasis, aka italics, with asterisks or underscores. Strong emphasis, aka bold, with asterisks or underscores. Combined emphasis with asterisks and underscores. Strikethrough uses two tildes. Lists
LinksI'm a relative reference to a repository file You can use numbers for reference-style link definitions Or leave it empty and use the link text itself. CodeInline var s = "JavaScript syntax highlighting";
alert(s); s = "Python syntax highlighting"
print s /**
* Helper method to obtain a Parser with registered strike-through & table extensions
* & task lists (added in 1.0.1)
*
* @return a Parser instance that is supported by this library
* @since 1.0.0
*/
@NonNull
public static Parser createParser() {
return new Parser.Builder()
.extensions(Arrays.asList(
StrikethroughExtension.create(),
TablesExtension.create(),
TaskListExtension.create()
))
.build();
} <ScrollView
android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?android:attr/actionBarSize">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dip"
android:lineSpacingExtra="2dip"
android:textSize="16sp"
tools:text="yo\nman" />
</ScrollView>
TablesColons can be used to align columns.
There must be at least 3 dashes separating each header cell. The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
Blockquotes
Quote break.
Nested quotes
Inline HTML<u><i>H<sup>T<sub>M</sub></sup><b><s>L</s></b></i></u> HTM Horizontal RuleThree or more... Hyphens ( Asterisks ( Underscores ( License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论