RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.

Overview

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.

Supported Functions

Toolbar

  • Bold
  • Italic
  • Subscript
  • Superscript
  • Strikethrough
  • Underline
  • Justify Left
  • Justify Center
  • Justify Right
  • Blockquote
  • Heading 1
  • Heading 2
  • Heading 3
  • Heading 4
  • Heading 5
  • Heading 6
  • Undo
  • Redo
  • Indent
  • Outdent
  • Insert Image
  • Insert Youtube
  • Insert Video
  • Insert Audio
  • Insert Link
  • Checkbox
  • Text Color
  • Text Background Color
  • Text Font Size
  • Unordered List (Bullets)
  • Ordered List (Numbers)

Attribute change of editor

  • Font Size
  • Background Color
  • Width
  • Height
  • Placeholder
  • Load CSS
  • State Callback

Milestone

  • Font Family

Demo

Demo

How do I use it?

Setup

Gradle
repositories {
  mavenCentral()
}

dependencies {
  implementation 'jp.wasabeef:richeditor-android:2.0.0'
}

Default Setting for Editor


Height

editor.setEditorHeight(200);

Font

editor.setEditorFontSize(22);
editor.setEditorFontColor(Color.RED);

Background

editor.setEditorBackgroundColor(Color.BLUE);
editor.setBackgroundColor(Color.BLUE);
editor.setBackgroundResource(R.drawable.bg);
editor.setBackground("https://raw.githubusercontent.com/wasabeef/art/master/chip.jpg");

Padding

editor.setPadding(10, 10, 10, 10);

Placeholder

editor.setPlaceholder("Insert text here...");

Others
Please refer the samples for usage.

Functions for ContentEditable


Bold

editor.setBold();

Italic

editor.setItalic();

Insert Image

editor.insertImage("https://raw.githubusercontent.com/wasabeef/art/master/twitter.png","twitter");

Text Change Listener

RichEditor editor = (RichEditor) findViewById(R.id.editor);
editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
  @Override
  public void onTextChange(String text) {
    // Do Something
     Log.d("RichEditor", "Preview " + text);
  }
});

Others
Please refer the samples for usage.

Requirements

Android 4+

Applications using RichEditor for Android

Please ping me or send a pull request if you would like to be added here.

Icon Application
Ameba Ownd
ScorePal

Developed By

Daichi Furiya (Wasabeef) - [email protected]

Follow me on Twitter

Thanks

  • Inspired by ZSSRichTextEditor in nnhubbard.

License

Copyright (C) 2020 Wasabeef

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • editor to be scrollable

    editor to be scrollable

    is there any way to scroll the editor, just like textview can be scrollable. I want the editor height to be fixed and should be able to scroll the content.

    opened by ShankyPatel 4
  • Can not input

    Can not input "+"

    I can't input "+", and found the below code in rich_editor.js

    RE.setHtml = function(contents) { RE.editor.innerHTML = decodeURIComponent(contents.replace(/+/g, '%20')); }

    why replace "+"?

    opened by chinnkou 4
  • Automatically Convert Links to Hyperlink

    Automatically Convert Links to Hyperlink

    Currently, URL links are not hyperlinked. It would be great if URLs were clickable. Setting the following code in HTML does not work:

            android:linksClickable="true"
            android:autoLink="web|email"
    

    Is there a way to automatically make hyperlinks clickable or is that not a feature?

    opened by searchy2 3
  • Add ability to disable input on editor making it readonly

    Add ability to disable input on editor making it readonly

    I have been trying to implement this editor for a little while and eventually found the need to make the input readonly. I'm aware that I could just switch out the editor for a web view to view the content but then you don't have consistency between the editor and the web view.

    Using setFocusable, setClickable and setLongClickable mean that you can't select the text to copy it.

    So instead I change the contentEditable property of the editor node in the JS.

    I also removed the user-select and user-modify from the CSS as you were mixing two different methods by doing so and it would have required adding a class to override the default styles as well. I chose contenteditable as it has better browser support.

    Let me know your thoughts.

    P.S. It appears that it would fix issue #79 as well

    opened by connorwyatt 3
  • Disable Input Mode

    Disable Input Mode

    Hi!

    I’m using your RichText Editor and it is beautiful!

    Please I have a question: is it possible to disable the input mode? I would like to present the page as read-only and the user has to unlock the page to edit it.

    Thanks in advance,

    Fabio.

    opened by FabioConsonni 3
  • remove static members and schedule tasks more efficiently, let other …

    remove static members and schedule tasks more efficiently, let other …

    remove static members and schedule tasks more efficiently, let other apps inherit from RichEditor, insert link without selecting a text, add bullets and numbers

    opened by roibareket 3
  • Soft Keyboard not showing on android 9 and android R

    Soft Keyboard not showing on android 9 and android R

    The layout is inflated correctly but when we try to type some text the soft-keyboard doesn't show up

    Tested on real tablet on android 9 , and on emulator android R. [version 1.2.2]

    opened by mbenyoub 2
  •   Use encodeURIComponent() so that it supports the following characte…

    Use encodeURIComponent() so that it supports the following characte…

    Use encodeURIComponent() so that it supports the following characters: , / ? : @ & = + $ #

    Tested and working

    https://www.w3schools.com/jsref/jsref_encodeURIComponent.asp

    opened by jbcorreia 2
  • Ensuring WebView overrides non-deprecated method

    Ensuring WebView overrides non-deprecated method

    Since this library's next version is going to target API 21+, adding shouldOverrideUrlLoading(WebView, WebResourceRequest) method relevant for Api 21+ as shouldOverrideUrlLoading(WebView,String) has been deprecated.

    opened by techeretic 2
  • Why setHtml(String content) move cursor to first position?

    Why setHtml(String content) move cursor to first position?

    Hi, In onTextChange() method i'm changing content and use setHtml() method but all the time, it's moving cursor to first position. May i know why this is happening?

    opened by praveenbbhati 2
  • how to delete a pic?

    how to delete a pic?

    I insert a pic ,but i find it's hard to delete it.When i want to delete a picture , the word before picture is deleted.The problem botherd me for days,anyone can help me ?

    opened by hzhyan 2
  • Texting in RichEditor with big html laggng

    Texting in RichEditor with big html laggng

    I have RichEditor field and it loading html

    rischEditText = composeView.findViewById(R.id.compose);
    rischEditText.loadCSS("file:///android_asset/style.css");
    

    When user have very big html, and then user start texting in RichEditor, text writing in lag response. Why and how to fix it?

    opened by virovinrom 0
  • Text not displayed/entered when using Japanese Keyboard

    Text not displayed/entered when using Japanese Keyboard

    Hello, I found a bug where Japanese is not displayed/entered in the editor when using a Japanese keyboard. May I know if someone has experienced this bug?

    opened by fdcadrianestaca 0
  • Not able to Parse to EditText

    Not able to Parse to EditText

    This library cannot be parsed into EditText class. I am using an emoji library that takes EditText in its methods, at the place of which, I have to put these richTextEditors , which is not possible.

    And other problem is it shows white background on start of activity which is not good.

    opened by AbdullahProgrammer426351 0
  • Trigger update decorations callback when focusing editor

    Trigger update decorations callback when focusing editor

    This fixes the issue where enabled decorations are not reported after setting HTML. Newly entered text respects already active decorations but since enabled decorations callback is not fired, custom UI that could rely on the callback to show enabled decorations is not updated to reflect the correct state.

    opened by ealih 0
Owner
Daichi Furiya
Google Developers Expert for Android
Daichi Furiya
[DISCONTINUED] Rrich text editor for android platform. 安卓富文本编辑器,暂停维护

icarus-android Maybe the best rich text editor on android platform. Base on Simditor Features Alignment (left/center/right) Bold Blockquote Code Horiz

Dyson Woo 739 Sep 5, 2022
A editable text with a constant text/placeholder for Android.

ParkedTextView A EditText with a constant text in the end. How to use <com.goka.parkedtextview.ParkedTextView xmlns:app="http://schemas.android.co

goka 270 Nov 11, 2022
RTL marquee text view android right to left moving text - persian - farsi - arabic - urdo

RTL marquee text view android right to left moving text - persian - farsi - arabic - urdo

mehran elyasi 4 Feb 14, 2022
👨‍💻 Squircle IDE is a fast and free multi-language code editor for Android

Squircle IDE is a fast and free multi-language code editor for Android. Table of Contents EditorKit Gradle Dependency The Basics More Opt

Dmitry Rubtsov 573 Jan 4, 2023
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

Feras Alnatsheh 1k Dec 20, 2022
:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0

LIBRARY IS NO LONGER MAINTAINED If you want to adopt + maintain this library, please drop me a message - [email protected] Android Full Justific

Mathew Kurian 1.9k Dec 29, 2022
Android form edit text is an extension of EditText that brings data validation facilities to the edittext.

Android Form EditText Android form edit text is an extension of EditText that brings data validation facilities to the edittext. Example App I built a

Andrea 1.5k Dec 14, 2022
Android library contain custom realisation of EditText component for masking and formatting input text

Masked-Edittext Masked-Edittext android library EditText widget wrapper add masking and formatting input text functionality. Install Maven <dependency

Evgeny Safronov 600 Nov 29, 2022
An address-autocompleting text field for Android

android-PlacesAutocompleteTextView An AutocompleteTextView that interacts with the Google Maps Places API to provide location results and caches selec

SeatGeek 283 Dec 28, 2022
Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android

Chips EditText Library Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I deve

kpbird 381 Nov 20, 2022
AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size.

AutoscaleEditText AutosizeEditText for Android is an extension of native EditText that offer a smooth auto scale text size. Latest Version How to use

Txus Ballesteros 354 Nov 28, 2022
Add text masking functionality to Android EditText. It will prevent user from inserting not allowed signs, and format input as well.

MaskFormatter MaskFormatter adds mask functionality to your EditText. It will prevent user from inserting not allowed signs, and format input as well.

Azimo Labs 161 Nov 25, 2022
Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText

Simple Linkable Text Simple way to create link text, such as @username or #hashtag, in Android TextView and EditText Installation Gradle Add dependenc

Aditya Pradana Sugiarto 76 Nov 29, 2022
Markdown Text for Android Jetpack Compose 📋.

Markdown Text for Android Jetpack Compose ??.

Jeziel Lago 250 Jan 4, 2023
Dealing with Android Text by simple way to get high performance.

Gapo Android RichText RichText supports Hashtag, Mention, Url, Phone Number, Email, Markdown, Custom Span, SeeMore/SeeLess by limited line or length,

GapoWork 8 Oct 20, 2021
Android Custom View for prevent the view behind on-screen keyboard when edit text is focused

Group Focusable Prevent the view behind on-screen keyboard when edit text is focused in Android UI Download Gradle implementation 'com.akexorcist:grou

Akexorcist 8 Jun 22, 2022
Dealing with Android Text by simple way to get high performance.

Gapo Android RichText RichText supports Hashtag, Mention, Url, Phone Number, Email, Markdown, Custom Span, SeeMore/SeeLess by limited line or length,

GapoWork 8 Oct 20, 2021
A simple Android library to protect part of text using Span

Text Protector A simple Android library to "protect" part of text using Span What is this? This is a small library for replacing part of a text in a T

Oleg Nestyuk 4 May 16, 2022
Light-weighted, convenient implementation of expandable text view that supports expanding & collapsing animations for Android projects

ExpandableTextView Light-weighted, convenient implementation of expandable text view that supports expanding & collapsing animations for Android proje

Giang H. Pham 22 Jan 6, 2023