RichEditor for Android
=============
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-richeditor--android-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1696)
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Download](https://api.bintray.com/packages/wasabeef/maven/richeditor-android/images/download.svg)](https://bintray.com/wasabeef/maven/richeditor-android/_latestVersion)
`RichEditor for Android` is a beautiful Rich Text `WYSIWYG Editor` for `Android`.
- _Looking for iOS? Check out_ [cjwirth/RichEditorView](https://github.com/cjwirth/RichEditorView)
Supported Functions
---
![Toolbar](./art/demo.gif)
- [x] Bold
- [x] Italic
- [x] Subscript
- [x] Superscript
- [x] Strikethrough
- [x] Underline
- [x] Justify Left
- [x] Justify Center
- [x] Justify Right
- [x] Blockquote
- [x] Heading 1
- [x] Heading 2
- [x] Heading 3
- [x] Heading 4
- [x] Heading 5
- [x] Heading 6
- [x] Undo
- [x] Redo
- [x] Indent
- [x] Outdent
- [x] Insert Image
- [x] Insert Link
- [x] Checkbox
- [x] Text Color
- [x] Text Background Color
- [x] Text Font Size
- [x] Unordered List (Bullets)
- [x] Ordered List (Numbers)
Attribute change of editor
---
- [x] Font Size
- [x] Background Color
- [x] Width
- [x] Height
- [x] Placeholder
- [x] Load CSS
- [x] State Callback
**Milestone**
- [ ] Font Family
Demo
---
![Demo](./art/demo2.gif)
Samples
---
<a href="https://play.google.com/store/apps/details?id=jp.wasabeef.sample"><img src="http://www.android.com/images/brand/get_it_on_play_logo_large.png"/></a>
How do I use it?
---
### Setup
##### Gradle
```groovy
repositories {
jcenter()
}
dependencies {
compile 'jp.wasabeef:richeditor-android:1.2.0'
}
```
### Default Setting for Editor
---
**Height**
```java
editor.setEditorHeight(200);
```
**Font**
```java
editor.setEditorFontSize(22);
editor.setEditorFontColor(Color.RED);
```
**Background**
```java
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**
```java
editor.setPadding(10, 10, 10, 10);
```
**Placeholder**
```java
editor.setPlaceholder("Insert text here...");
```
**Others**
Please refer the [samples](https://github.com/wasabeef/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java) for usage.
### Functions for ContentEditable
---
**Bold**
```java
editor.setBold();
```
**Italic**
```java
editor.setItalic();
```
**Insert Image**
```java
editor.insertImage("https://raw.githubusercontent.com/wasabeef/art/master/twitter.png","twitter");
```
**Text Change Listener**
```java
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](https://github.com/wasabeef/richeditor-android/blob/master/sample/src/main/java/jp/wasabeef/sample/MainActivity.java) for usage.
Requirements
--------------
Android 4+
Applications using RichEditor for Android
---
Please [ping](mailto:dadadada.chop@gmail.com) me or send a pull request if you would like to be added here.
Icon | Application
------------ | -------------
<img src="https://lh6.ggpht.com/6zKH_uQY1bxCwXL4DLo_uoFEOXdShi3BgmN6XRHlaJ-oA1svmq6y1PZkmO50nWQn2Lg=w300-rw" width="48" height="48" /> | [Ameba Ownd](https://play.google.com/store/apps/details?id=jp.co.cyberagent.madrid)
<img src="https://lh3.googleusercontent.com/st_DiIlM148vzG23ccujtBzx0tMeb7cDC5fDmLSERS-Nr8M_F-PTw4W_jWJsH9mO_b4=w300-rw" width="48" height="48" /> | [ScorePal](https://play.google.com/store/apps/details?id=com.hfd.scorepal)
Developed By
-------
Daichi Furiya (Wasabeef) - <dadadada.chop@gmail.com>
<a href="https://twitter.com/wasabeef_jp">
<img alt="Follow me on Twitter"
src="https://raw.githubusercontent.com/wasabeef/art/master/twitter.png" width="75"/>
</a>
Thanks
-------
* Inspired by `ZSSRichTextEditor` in [nnhubbard](https://github.com/nnhubbard/ZSSRichTextEditor).
License
-------
Copyright 2015 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.
没有合适的资源?快使用搜索试试~ 我知道了~
超强富文本框-功能模块DEMO
共59个文件
png:30个
xml:5个
java:5个
需积分: 21 27 下载量 41 浏览量
2016-07-05
14:27:32
上传
评论
收藏 1.55MB ZIP 举报
温馨提示
远远超过editext的纯文本编辑功能 《完美解决富文本框保存问题!!》 支持图片插入 支持字体颜色选择 支持字体大小选择 支持插入超链接 支持下标、上标 支持字体粗细 支持导出保存为html格式 我们项目组用的就是这套代码,非常好用,代码清晰易懂。
资源推荐
资源详情
资源评论
收起资源包目录
richeditor-android-master.zip (59个子文件)
richeditor-android-master
.gitignore 247B
gradle
wrapper
gradle-wrapper.jar 49KB
gradle-wrapper.properties 231B
README.md 5KB
build.gradle 496B
CHANGELOG.md 356B
art
demo.gif 554KB
demo2.gif 972KB
gradlew.bat 2KB
gradlew 5KB
LICENSE 11KB
richeditor
build.gradle 519B
src
main
AndroidManifest.xml 58B
java
jp
wasabeef
richeditor
Utils.java 2KB
RichEditor.java 11KB
assets
normalize.css 7KB
editor.html 421B
rich_editor.js 8KB
style.css 1KB
androidTest
java
jp
wasabeef
richeditor
ApplicationTest.java 346B
gradle.properties 876B
sample
build.gradle 1KB
src
main
AndroidManifest.xml 699B
java
jp
wasabeef
sample
MainActivity.java 6KB
res
values
styles.xml 184B
strings.xml 141B
mipmap-xxhdpi
ic_launcher.png 8KB
layout
activity_main.xml 8KB
mipmap-xhdpi
ic_launcher.png 5KB
mipmap-hdpi
ic_launcher.png 3KB
drawable-xxhdpi
h6.png 708B
bg.png 11KB
txt_color.png 2KB
h1.png 352B
outdent.png 840B
h4.png 498B
strikethrough.png 1KB
h5.png 615B
h2.png 650B
undo.png 1KB
indent.png 825B
justify_center.png 372B
html_edit.png 1KB
h3.png 679B
italic.png 867B
subscript.png 1KB
bg_color.png 2KB
bold.png 1KB
insert_image.png 1KB
blockquote.png 420B
superscript.png 1KB
justify_right.png 322B
justify_left.png 342B
underline.png 878B
insert_link.png 1KB
redo.png 1KB
mipmap-mdpi
ic_launcher.png 2KB
androidTest
java
jp
wasabeef
sample
ApplicationTest.java 342B
settings.gradle 33B
共 59 条
- 1
资源评论
Finley2021
- 粉丝: 5
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功