Html Editor
Replacement for Android's EditText, which allows user to input text with formatting. Features:
- Bold
- Italic
- Underline
- Text color
- Text background color
- Bullets
- Numbered list
- 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>");