项目作者: wasabeef

项目描述 :
RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.
高级语言: Java
项目地址: git://github.com/wasabeef/richeditor-android.git
创建时间: 2015-03-30T16:19:20Z
项目社区:https://github.com/wasabeef/richeditor-android

开源协议:Apache License 2.0

下载

















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
  1. repositories {
  2. mavenCentral()
  3. }
  4. dependencies {
  5. implementation 'jp.wasabeef:richeditor-android:2.0.0'
  6. }

Default Setting for Editor


Height

  1. editor.setEditorHeight(200);

Font

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

Background

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

Padding

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

Placeholder

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

Others
Please refer the samples for usage.

Functions for ContentEditable


Bold

  1. editor.setBold();

Italic

  1. editor.setItalic();

Insert Image

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

Text Change Listener

  1. RichEditor editor = (RichEditor) findViewById(R.id.editor);
  2. editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
  3. @Override
  4. public void onTextChange(String text) {
  5. // Do Something
  6. Log.d("RichEditor", "Preview " + text);
  7. }
  8. });

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) - dadadada.chop@gmail.com


Follow me on Twitter

Thanks

License

  1. Copyright (C) 2020 Wasabeef
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.