html-editor

Additional

Language
Java
Version
1.1 (Jan 21, 2020)
Created
Jan 21, 2020
Updated
Jan 21, 2020 (Retired)
Owner
Abhijit Rao (appsfeature)
Contributors
Abhijit Rao (appsfeature)
alphatestingdroid
2
Activity
Badge
Generate
Download
Source code

Html Editor

Replacement for Android's EditText, which allows user to input text with formatting. Features:

  1. Bold
  2. Italic
  3. Underline
  4. Text color
  5. Text background color
  6. Bullets
  7. Numbered list
  8. Inline image

Setup

Add this to your project build.gradle

allprojects {
    repositories {
        maven {
            url "https://jitpack.io"
        }
    }
}

Dependency

dependencies {
        implementation 'com.github.appsfeature:html-editor:x.y'
}

Usage

in your xml file

    <com.htmleditor.HtmlTextEditor
        android:id="@+id/html_editor"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

Retrive HTML Data

    htmlTextEditor = (HtmlTextEditor) findViewById(R.id.html_editor);
    String htmlData = htmlTextEditor.getText()

Set HTML Data

    htmlTextEditor.setText("<h2>Hello World.<h2><br><h3> I'am Summernote</h3>");