MarkdownTwain
A Jetpack Compose UI library for editing Markdown content on Android, based on Markwon
Install / Use
/learn @colintheshots/MarkdownTwainREADME
MarkdownTwain
MarkdownTwain is an open source Android software library that provides an easy-to-use syntax highlighting editor and viewer for Markdown text using Jetpack Compose for Android. This library is based upon the existing Markwon library for Android Views.
With MarkdownTwain, developers can easily add a Markdown editor and viewer to their Android applications, allowing users to easily format and style their text with Markdown syntax.
Note: MarkdownTwain was created by Colin Lee while working at Meetup.com. The package was migrated to colintheshots.com along with the change in Meetup ownership. Maven package information has changed. Use the new com.colintheshots name to get the latest updates. Also, I also fixed issues preventing using older artifacts on Maven Central.
Features
- Syntax highlighting for Markdown text
- Preview of formatted text in real-time
- Easy-to-use editor and viewer components
- Customizable styling options
- Based on the popular Markwon library for Android Views
Demo
https://user-images.githubusercontent.com/626405/230183141-e41033f1-26ba-44bf-adcb-fac65ba649a3.mp4
Usage
To use MarkdownTwain in your Android project, follow these steps:
- Add the following dependency to your app's
build.gradle.ktsorbuild.gradlefile:
dependencies {
implementation("com.colintheshots:twain:0.3.2")
}
</details>
<details>
<summary>Groovy</summary>
dependencies {
implementation 'com.colintheshots:twain:0.3.2'
}
</details>
- Use the
MarkdownEditor()orMarkdownText()Composables in your Jetpack Compose layouts. There are extra attributes available for customizing the display.
val textFieldValue = rememberSaveable(stateSaver = TextFieldValue.Saver) {
mutableStateOf("")
}
Card {
MarkdownEditor(
value = textFieldValue.value,
onValueChange = { value ->
textFieldValue.value = textFieldValue.value.copy(text = value)
},
modifier = Modifier.fillMaxWidth()
)
}
</details>
<details open>
<summary>MarkdownText</summary>
MarkdownText(
markdown = textFieldValue.value.text,
modifier = Modifier.fillMaxWidth()
)
</details>
License
MarkdownTwain is licensed under the Apache 2.0 License. See the LICENSE file for details.
Acknowledgments
MarkdownTwain is based upon the Markwon library for Android Views. Special thanks to Dimitry and all contributors to the Markwon project.
Related Skills
docs-writer
99.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
337.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
zola-ai
An autonomous Solana wallet agent that executes payments via Twitter mentions and an in-app dashboard, powered by Claude.
