{"id":26601282,"url":"https://github.com/chinalwb/android-rich-text-editor","last_synced_at":"2025-04-06T20:08:17.367Z","repository":{"id":45251550,"uuid":"93315292","full_name":"chinalwb/Android-Rich-text-Editor","owner":"chinalwb","description":"Android Rich Text Editor With customized spans - 富文本编辑器 - Don't miss this one :) ","archived":false,"fork":false,"pushed_at":"2023-10-13T02:49:36.000Z","size":43670,"stargazers_count":856,"open_issues_count":92,"forks_count":166,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-06T20:08:04.412Z","etag":null,"topics":["android","emoji-picker","font-size","image","internet","ordered-list","quotes","rich-text-editor","subscript","superscript","video","youdaonote"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chinalwb.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-04T13:29:53.000Z","updated_at":"2025-04-02T07:46:16.000Z","dependencies_parsed_at":"2025-03-23T18:38:44.046Z","dependency_job_id":null,"html_url":"https://github.com/chinalwb/Android-Rich-text-Editor","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinalwb%2FAndroid-Rich-text-Editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinalwb%2FAndroid-Rich-text-Editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinalwb%2FAndroid-Rich-text-Editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinalwb%2FAndroid-Rich-text-Editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinalwb","download_url":"https://codeload.github.com/chinalwb/Android-Rich-text-Editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543589,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","emoji-picker","font-size","image","internet","ordered-list","quotes","rich-text-editor","subscript","superscript","video","youdaonote"],"created_at":"2025-03-23T18:38:12.726Z","updated_at":"2025-04-06T20:08:17.348Z","avatar_url":"https://github.com/chinalwb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARE\n\nAndroid富文本编辑器\n===\n\n如果你正在寻找一个Android上使用的富文本编辑器，那么请你花1分钟时间看完这个说明。\n\n这个项目总体进度已经发布7个小版本，更多功能正在进行中。由于我自己在项目中开发富文本编辑器的时候，从GitHub上找不到符合我们需求的，几年之后我对比了GitHub上新提交的富文本编辑器之后，感到仍然跟我们的需求不一致，不是用户体验不好就是功能较少，尤其是列表编辑功能。于是我自己开始了这个项目。\n\n项目用Java实现，应用Android的Span实现富文本多种样式的编辑。\n\n ![image](https://github.com/chinalwb/are/blob/master/ARE/demo/are_demo.gif)\n\n目前支持的样式:\n---\n\n* 加粗 - Bold\n* 斜体 - Italic\n* 下划线 - Underline\n* 删除线 - Strikethrough\n* 有序列表 - Numeric list\n* 无序列表 - Bullet list\n* 左对齐 - Align left\n* 居中对齐 - Align center\n* 右对齐 - Align right\n* 插入图片 - Insert image\n* 文字背景色 - Background color\n* 插入超链接 - Hyper link \n* @功能 - @ \n* 引用 \n* 文字颜色（前景色） \n* 插入表情 \n* 上角标 \n* 下角标 \n* 字体大小  \n* 插入视频\n* 插入网络图片\n* 插入分割线\n* 所有样式均支持导出HTML文件\n* 加载HTML内容并继续编辑或显示\n\n## 样式属性\n\n| 名称               | 格式      | 描述                                                                          |\n|:----------------:|:-------:|:---------------------------------------------------------------------------:|\n| expandMode       | enum    | FULL (默认: 编辑区域最大化) / MIN (编辑区域最小高度, 行数最多设定为 3 行 -maxLines = 3)              |\n| hideToolbar      | boolean | 是否隐藏工具栏。默认为false 即不隐藏。当设定为true的时候工具栏不显示，这种情况下`@`功能可用，但其他功能因为跟随工具栏一起隐藏所以不可用。 |\n| toolbarAlignment | enum    | BOTTOM (默认: 在编辑区域的下方) / TOP (在编辑区域的上方)                                      |\n\n## API\n\n| 类        | 方法                  | 参数                        | 描述                                                                        |\n|:--------:|:-------------------:|:-------------------------:|:-------------------------------------------------------------------------:|\n| AREditor | setExpandMode       | AREditor.ExpandMode       | 设定编辑区域的显示模式. 可能的取值有: ExpandMode.FULL (default) / ExpandMode.MIN           |\n| ARE      | setHideToolbar      | boolean                   | 设定为true 隐藏工具栏，设定为false显示工具栏（默认为false 即不隐藏）                                |\n| AREditor | setToolbarAlignment | AREditor.ToolbarAlignment | 设定工具栏的位置. 可能的取值有: `ToolbarAlignment.BOTTOM` (默认) / `ToolbarAlignment.TOP` |\n\n## 示例\n\nXML:\n\n```\n\u003cRelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:are=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@android:color/holo_blue_dark\"\n    \u003e\n\n    \u003cTextView\n        android:id=\"@+id/xView\"\n        android:layout_above=\"@+id/areditor\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginTop=\"1dp\"\n        android:background=\"@color/colorAccent\"\n        android:gravity=\"center\"\n        android:textSize=\"50sp\"\n        android:text=\"Your ListView may go here\"\n        /\u003e\n\n    \u003ccom.chinalwb.are.AREditor\n        android:id=\"@+id/areditor\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"@android:color/holo_green_dark\"\n        are:expandMode=\"MIN\"\n        are:hideToolbar=\"true\"\n        are:toolbarAlignment=\"TOP\" /\u003e\n\n\u003c/RelativeLayout\u003e\n```\n\nJava:\n\n```\nAREditor arEditor = this.findViewById(R.id.areditor);\narEditor.setExpandMode(AREditor.ExpandMode.FULL);\narEditor.setHideToolbar(false);\narEditor.setToolbarAlignment(AREditor.ToolbarAlignment.BOTTOM);\n```\n\n计划中但正在做的功能:\n---\n\n* 从 HTML 加载内容到ARE\n* 嵌入音频\n* 字体样式 - Font family\n* 右缩进 - Indent right\n* 左缩进 - Indent left\n* 保存编辑内容到SQLite\n* 显示保存文件列表\n* 插入标题 - 推迟 - 暂时可用字体+居中完成所需效果\n\n##如何使用?\n[直接集成ARE源代码到开发环境看这个](https://github.com/chinalwb/Android-Rich-text-Editor/blob/master/Usage.md)。\n\n我打算在所有功能完成之后再将其作为Gradle插件提交到maven， 所以暂时还是需要把代码检出之后手动引用到项目中。\n\n```\n\u003ccom.chinalwb.are.AREditor xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/areditor\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@android:color/white\" /\u003e\n```\n\n下载最新的demo版apk: \n\n[Click ARE_20180702_0.1.1.apk to download](https://github.com/chinalwb/Android-Rich-text-Editor/releases/download/v0.1.0/ARE_20180702_0.1.1.apk)\n\n已知问题:\n\n* 背景色 - 当给文字加上背景色之后光标闪烁效果消失\n\n---\n\n如果你觉得我的代码对你有帮助或者你已经在使用此项目中的部分功能，麻烦点※以表支持，我会贡献更多功能的代码，多谢支持。\n功能定制化或任何建议联系我的QQ邮箱：329055754@qq.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinalwb%2Fandroid-rich-text-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinalwb%2Fandroid-rich-text-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinalwb%2Fandroid-rich-text-editor/lists"}