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.
Issues
  • Can't remove format

    Can't remove format

    Add please command for format removing

    opened by nastyanick 6
  • 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
  • add feature fontSize

    add feature fontSize

    add fontSize values between 1-7

    opened by chrissd23 4
  • Please update to new version

    Please update to new version

    Hi,

    Is it possible to upload the latest version to jcenter ?

    It would be nice , because i would like to use list elements :)

    opened by chrissd23 4
  • 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
  • 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
  • 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
  • How to show keyboard on activity start when focusing to editor

    How to show keyboard on activity start when focusing to editor

    i requested the focus by mEditor.focusEditor(); and then code to show keyboard which works with edittext. but with editor, it's not working.

    opened by karandatwani92 3
  • Append text into cursor position

    Append text into cursor position

    Would it be possible to add text at the cursor position?

    For example, adding a button that clicks adds standard text.

    opened by Luiz-Otavio-Dorigon 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 pop up problem(软键盘弹出问题)

    Soft keyboard pop up problem(软键盘弹出问题)

    When I set bold or other, and then pop up the soft keyboard, the previous setting will not take effect. Ask for help (当我设置粗体或者其他后,再弹起软键盘,刚才的设置会不生效。求帮助)

    opened by MissCrlRjy 0
  • document.execCommand is deprecated

    document.execCommand is deprecated

    Hey, I'm currently maintaining an iOS version of this rich editor. While writing #262, I noticed that the document.execCommand is deprecated. Are there any plans to migrate rich_editor.js to more customized commands here?

    It seems like the only things we can do is to set the style of elements ourselves. For example, justifyLeft is el.style.textAlign = "left". But I'm not sure how compatible that is for each of our browsers (mobile chrome and safari). Any other blockers you can think of?

    Side note: I think lots of the JS could use the ES6 arrow functions () => {} and let instead of var.

    opened by Andrew-Chen-Wang 0
  • Add toggle to header setting

    Add toggle to header setting

    ref: https://github.com/Andrew-Chen-Wang/RichEditorView/issues/11#issuecomment-827913792

    opened by Andrew-Chen-Wang 0
  • Press enter issue

    Press enter issue

    After setting html on richeditor and then editing text with enter only adding new line and cusror not moving. How to resolve?

    opened by Harrybisht3 0
  • JCenter() deprecated

    JCenter() deprecated

    JCenter is being deprecated May 1, 2021. This library will need to have its artifacts moved to MavenCentral or some other maven repository.

    opened by moetouban 0
  • Autolink URLs

    Autolink URLs

    Hi, I was able to insert link in the editor. But couldn't implement autolink action on it, making the link clickable. Any workarounds for this?

    opened by Ann-Mobiz 0
  • GBoard removes formatting

    GBoard removes formatting

    The formatting like Bold,Italic is removed when we press enter after the word without leaving space.

    Steps to reproduce

    • Type a word in bold.
    • Remove bold from selection
    • Now press enter.

    The bold is removed on pressing enter. This seems to be an issue only when using GBoard. It seems to work fine in Swiftkey.

    GBoard_GIF

    opened by SaikrishnaRajaraman 0
  • Can't get focus in first click, it need to click twice to get editor focus

    Can't get focus in first click, it need to click twice to get editor focus

    Can not get focus in first click, it need to click twice to get editor focus.

    Please help.

    opened by guizot 1
  • Add a default toolbar layout with vector icons having icon tint option.

    Add a default toolbar layout with vector icons having icon tint option.

    Provide a default optional toolbar with option to register the toolbar with web view for handling clicks internally. Also the option to tint icon colors with vector drawable support.

    opened by Viki-robot 0
  • Unable to upload image from device

    Unable to upload image from device

    Unable to insert Image from device Image is selected from device folder, but by using new file path I am unable to insert that image in TextEditor

    image

    opened by shami2812 3
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 737 Jun 13, 2021
Android Floating Label

FloatingLabel FloatingLabel Allows you to create a blow kind of EditText. To explain the concept well I have taken below image from http://dribbble.co

Hardik Trivedi 284 Jun 16, 2021
Gmail style MultiAutoCompleteTextView for Android

Version 3.0 The 3.0.1 version is now available! This should resolve a number of text handling issues and lay the groundwork for better support of mixe

Splitwise 1.3k Jul 19, 2021
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.4k Jul 23, 2021
User input masking library repo.

More GIFs [~3 MB] Migration Guide: v.6 This update brings breaking changes. Namely, the autocomplete flag is now a part of the CaretGravity enum, thus

red_mad_robot 1.1k Jul 27, 2021

AnimTextView (below chart) #传入数据,执行动画 (下面有效果图) ScreenShot 简单示例 代码: private void initView() { mTvBig = (AnimTextView) findViewById(R.id.mTvBig);

DuGuang 421 Jun 1, 2021
Animation effects to text, not really textview

HTextView Animation effects with custom font support to TextView see iOS Effects see Flutter Effects Screenshot type gif Scale Evaporate Fall Line Typ

hanks 5.2k Jul 26, 2021
Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab fonts.

Android-RobotoTextView Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the bran

Evgeny Shishkin 789 Jun 28, 2021
A custom EditText with a switchable icon which shows or hides the password

Deprecated This library is deprecated now as there is an official way to use the password toggle with the TextInputLayout (inside the support library

Maksim 429 Jul 12, 2021
字体对齐的textview

AlignTextView 字体对齐的TextView 系统要求 Android 4.0以上 快速使用 build.gradle加入dependencies compile 'me.codeboy.android:align-text-view:2.3.2' AlignTextView (不支持选

木小桓 1.3k Jul 28, 2021
Awesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter or Facebook.

android-typeahead Awesome Android Typeahead library - User mention plugin, UI widget for auto complete user mention using the at sign (@) like Twitter

Arab Agile 11 Jun 4, 2019
Digipad is a simple library for Android that only show a numeric keyboard onscreen

Digipad is a simple library for Android that only show a numeric keyboard onscreen Adding dependencies Add this to your build.gradle:

Yoga C. Pranata 4 May 19, 2021
An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Hans Petter Eide 167 Mar 17, 2021
An Android TextView that always displays an auto refreshing relative time span with respect to a reference time

android-ago This library provides RelativeTimeTextView, a custom TextView that takes a reference time and always displays the relative time with respe

Kiran Rao 665 Jul 29, 2021