当前位置:   article > 正文

Android富文本编辑器_富文本编译器手机版

富文本编译器手机版

Android富文本编辑器,一款支持撤销、加粗、斜体、下划线、有序无序列表、对齐、改文字大小、改文字颜色、插入图片、插入视频等功能,并且可设置cookie,自定义素材操作菜单的的编辑器。

github地址:https://github.com/yeaper/RichEditor

演示

1.控件使用

RichEditor是富文本编辑器,EditorOpMenuView是操作栏控件,两个需要配合使用,xml引用方式如下:

<com.yyp.editor.RichEditor
    android:id="@+id/editor"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

<com.yyp.editor.widget.EditorOpMenuView
    android:id="@+id/editor_op_menu_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

两个控件最后需要绑定

mEditorOpMenuView.setRichEditor(mEditor);
  • 1

2.编辑器相关设置

//设置占位文字
mEditor.setPlaceholder("请填写文章正文内容(必填)");
//设置编辑器文字大小
mEditor.setEditorFontSize(16);
//设置编辑器内边距
mEditor.setPadding(10, 10, 10, 10);
//设置编辑器背景色
mEditor.setBackgroundColor(UIUtils.getResources().getColor
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/812797
推荐阅读
相关标签
  

闽ICP备14008679号