Skip to content

jja08111/markdown-toolbar-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

14 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Markdown Toolbar - Compose

Maven Central

๋ชจ๋ฐ”์ผ ๊ธฐ๊ธฐ์—์„œ ํŽธํ•˜๊ฒŒ ๋งˆํฌ๋‹ค์šด ํƒœ๊ทธ๋ฅผ ์ž…๋ ฅํ•  ์ˆ˜ ์žˆ๋„๋ก ๋„์™€์ฃผ๋Š” Android ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ž…๋‹ˆ๋‹ค.

ํ‚ค๋ณด๋“œ๊ฐ€ ์žˆ๋Š” ์ปดํ“จํ„ฐ ํ™˜๊ฒฝ๊ณผ๋Š” ๋‹ค๋ฅด๊ฒŒ ๋ชจ๋ฐ”์ผ ํ™˜๊ฒฝ์€ ๋งˆํฌ๋‹ค์šด ํƒœ๊ทธ ๊ฐ™์€ ํŠน์ˆ˜ ๋ฌธ์ž๋ฅผ ์ž…๋ ฅํ•˜๋Š”๋ฐ ๋ฒˆ๊ฑฐ๋กญ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ ์ž ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๊ฐœ๋ฐœํ–ˆ์Šต๋‹ˆ๋‹ค.

preview

Faced Issues

์ˆ˜๋™์œผ๋กœ ๋กœ์ง์„ ๊ฒ€์ฆํ•˜๋Š”๋ฐ ์‹œ๊ฐ„ ์†Œ๋ชจ๊ฐ€ ํผ

  • ๋ฌธ์ œ: ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•ด ๋ฐ˜๋ณต์ ์œผ๋กœ ํ…Œ์ŠคํŠธ ๊ธฐ๊ธฐ์—์„œ ์ง์ ‘ ๊ฐ’์„ ์ž…๋ ฅํ•˜๊ณ , ํƒœ๊ทธ๋ฅผ ํด๋ฆญํ•˜๊ณ  ๊ฒฐ๊ณผ๋ฌผ์„ ํ™•์ธํ•˜๋Š” ๊ณผ์ •์ด ๋ฒˆ๊ฑฐ๋กœ์›€
  • ํ•ด๊ฒฐ: ์œ ๋‹› ํ…Œ์ŠคํŠธ ๋ฐ UI ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ๋น ๋ฅด๊ฒŒ ์ฝ”๋“œ๋ฅผ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•จ

์œ ๋‹› ํ…Œ์ŠคํŠธ ์ฝ”๋“œ์˜ ์ค‘๋ณต์ด ๋งŽ์Œ

  • ๋ฌธ์ œ: ํ•จ์ˆ˜๋ฅผ ํ…Œ์ŠคํŠธํ•˜๊ธฐ ์œ„ํ•ด ๋ฐ˜๋ณต๋˜๋Š” ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๊ฐ€ ๋งŽ์•„ ๊ฐ€๋…์„ฑ ๋ฐ ์œ ์ง€๋ณด์ˆ˜์„ฑ์ด ๋–จ์–ด์ง
  • ํ•ด๊ฒฐ: JUnit์˜ Parameterized Test๋ฅผ ์ด์šฉํ•˜์—ฌ input, output๋งŒ์„ ์ •์˜ํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์—ฌ ์ค‘๋ณต ์ œ๊ฑฐ ๋ฐ ์œ ์ง€๋ณด์ˆ˜์„ฑ ํ–ฅ์ƒ

Usage

Add below code to the dependencies and sync the build gradle.

dependencies {
    implementation "io.github.jja08111:markdown-toolbar-compose:0.1.0"
}

Example

Pass the TextFieldValue to the argument. You can customize icons by using the icons.

var textFieldValue by remember { mutableStateOf(TextFieldValue()) }

MarkdownToolBar(
    value = textFieldValue,
    onValueChange = { textFieldValue = it },
    icons = mapOf(MarkdownTag.BOLD to Icons.Default.FormatBold),
)

Supported Markdown Tags

  • Bold
  • Italic
  • List item
  • Task list item
  • Hading
  • Strikethrough
  • Quote
  • Code highlight
  • Code block

TODO

  • Image