MarkdownEditText

A native Rich text editor for android based on Markwon library with export to Markdown option.


Preview

MarkdownEditText


Usage:

Adding the depencency

Add the dependency to your app build.gradle file:

implementation 'com.yahiaangelo.markdownedittext:markdownedittext:1.0.2'

XML

    <com.yahiaangelo.markdownedittext.MarkdownEditText
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintTop_toBottomOf="@id/appbar"
        android:id="@+id/edittext"
        android:gravity="top"/>

    <com.yahiaangelo.markdownedittext.MarkdownStylesBar
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:id="@+id/stylesbar"
        app:buttonColor="@color/style_button_colors"
        android:clipToPadding="false"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        app:layout_constraintBottom_toBottomOf="parent"/>

Code

   val markdownEditText = findViewById<MarkdownEditText>(R.id.edittext)
   val stylesBar = findViewById<MarkdownStylesBar>(R.id.stylesbar)
   markdownEditText.setStylesBar(stylesBar)

Available styles:

  • bold
  • italic
  • strike through
  • bullet list
  • numbered list

GitHub