A markup language and renderer for Android Compose.
Composer is a powerful markup language and renderer designed for Android Jetpack Compose. It allows for structured text formatting with headings, syntax highlighting, colors, and more.
- Headings: Supports multiple levels of headings.
- Inline Styling: Bold, italic, underlined, strikethrough text.
- Code Blocks: Syntax highlighting for Kotlin and Python.
- Quotes: Render block quotes.
- Tables: Supports structured tabular data.
- Lists: unordered, and checklists.
- Hyperlinks & Images: Embed links and images easily.
- Date & Time Formatting: Supports dynamic placeholders.
ComposerUI(
modifier = Modifier.padding(16.dp),
source = sourceText,
onClickLink = {
//link is clicked
},
)
add a dependency
dependencies {
implementation("com.naulian:composer:0.1.0")
}
#1 heading 1
#2 heading 2
#3 heading 3
#4 heading 4
#5 heading 5
#6 heading 6
=line=
`ignore ~syntax~ here`
Lorem ipsum dolor sit <amet, (.kt val name = "hello") consectetur#FF0000> adipiscing elit.
<color this text#FF0000>
Bold &bold text&
Italic /italic text/
Underlined _underlined text_
Strikethrough ~strikethrough text~
date: %dd/MM/yyyy%
Current time : $time
"this is quote text -author"
{.kt
fun main(varargs args: String) {
println("Hello World!")
val currentMillis = System.currentTimeMillis()
println("Current time in millis: $currentMillis")
// output : $millis
}}
{
.py
def main():
print("Hello World!")
if __name__ == '__main__':
main()
}
Search (here@http://www.google.com) for anything.
(img@https://picsum.photos/id/67/300/200)
[
a |b |result
true |true |true
true |false|false
&false&|false|false
]
* list item
* list item
*o uncheck item
*x checked item
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
feature-branch
) - Commit your changes.
- Push to the branch and submit a pull request.
This project is licensed under the The Apache License, Version 2.0.
For issues or suggestions, open an issue or reach out at [email protected].