RepoPilotOpen in app →

wasabeef/richeditor-android

RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android.

Mixed

Stale — last commit 2y ago

weakest axis
Use as dependencyMixed

last commit was 2y ago; no CI workflows detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isMixed

last commit was 2y ago; no CI workflows detected

  • 17 active contributors
  • Apache-2.0 licensed
  • Tests present
Show all 6 evidence items →
  • Stale — last commit 2y ago
  • Concentrated ownership — top contributor handles 76% of recent commits
  • No CI workflows detected
What would change the summary?
  • Use as dependency MixedHealthy if: 1 commit in the last 365 days
  • Deploy as-is MixedHealthy if: 1 commit in the last 180 days

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/wasabeef/richeditor-android?axis=fork)](https://repopilot.app/r/wasabeef/richeditor-android)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/wasabeef/richeditor-android on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: wasabeef/richeditor-android

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/wasabeef/richeditor-android shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Stale — last commit 2y ago

  • 17 active contributors
  • Apache-2.0 licensed
  • Tests present
  • ⚠ Stale — last commit 2y ago
  • ⚠ Concentrated ownership — top contributor handles 76% of recent commits
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live wasabeef/richeditor-android repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/wasabeef/richeditor-android.

What it runs against: a local clone of wasabeef/richeditor-android — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in wasabeef/richeditor-android | Confirms the artifact applies here, not a fork | | 2 | License is still Apache-2.0 | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | Last commit ≤ 747 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>wasabeef/richeditor-android</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of wasabeef/richeditor-android. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/wasabeef/richeditor-android.git
#   cd richeditor-android
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of wasabeef/richeditor-android and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "wasabeef/richeditor-android(\\.git)?\\b" \\
  && ok "origin remote is wasabeef/richeditor-android" \\
  || miss "origin remote is not wasabeef/richeditor-android (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
  && ok "license is Apache-2.0" \\
  || miss "license drift — was Apache-2.0 at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 747 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~717d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/wasabeef/richeditor-android"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

RichEditor for Android is a WYSIWYG (What You See Is What You Get) rich text editor library that embeds a WebView-based editor (rich_editor.js) into Android apps. It provides 30+ formatting features (bold, italic, headings, lists, colors, media insertion) via a JavaScript bridge, letting developers drop a pre-built editor into their apps without building from scratch. Monorepo with two modules: (1) richeditor/ is the library (core editor in RichEditor.java wrapping WebView + assets/rich_editor.js + assets/editor.html), (2) sample/ is the demo app. Assets include normalize.css, style.css for editor styling, and rich_editor.js (~10KB) implementing contenteditable document.execCommand() calls. Bridging happens via Android WebView's JavaScriptInterface.

👥Who it's for

Android developers building content creation apps, note-taking apps, or CMS clients who need users to format and edit rich text with a familiar toolbar UI. Also relevant for teams maintaining productivity or social apps that accept formatted user input.

🌱Maturity & risk

Moderately mature and actively used (published to Maven Central as jp.wasabeef:richeditor-android). However, Gradle build config references deprecated JCenter repository, build tools are from 2021 (gradle 4.2.0-beta04), and the CHANGELOG/commit history suggest slow update cadence. Tests are minimal (only ApplicationTest.java files visible). Verdict: Production-ready for basic use cases, but aging infrastructure.

Single-maintainer risk (wasabeef), aging Android toolchain (Gradle 4.2.0-beta from 2021 will not work with modern Android Studio), and deprecated JCenter still in allprojects block. The WebView-to-Java bridge (contenteditable HTML via JavaScript) can be fragile across Android OS versions. No visible CI/CD pipeline (.github/workflows missing), making regression detection unclear.

Active areas of work

Based on file structure, active development is paused. Gradle build config is stale (4.2.0-beta, deprecated JCenter). CHANGELOG.md and README.md exist but no recent activity visible. iOS counterpart (cjwirth/RichEditorView) is mentioned, suggesting this is a port-and-maintain project rather than actively evolved.

🚀Get running

Clone the repo, open in Android Studio, and sync Gradle (you'll need to fix the Gradle plugin version in build.gradle). Then run: ./gradlew build (Linux/Mac) or gradlew.bat build (Windows). To run the sample: ./gradlew sample:installDebug and launch on an emulator or device.

Daily commands: No npm/yarn. Use Gradle: ./gradlew build compiles the library and sample. To launch sample app on device: ./gradlew sample:installDebug && adb shell am start -n jp.wasabeef.sample/.MainActivity

🗺️Map of the codebase

🛠️How to make changes

For editor feature changes: modify richeditor/src/main/assets/rich_editor.js (JavaScript command execution) and richeditor/src/main/java/jp/wasabeef/richeditor/RichEditor.java (Java API wrapper). For styling: richeditor/src/main/assets/style.css. For UI: edit sample/src/main/java/ or sample/src/main/res/. Test changes using sample app.

🪤Traps & gotchas

Gradle version in build.gradle (4.2.0-beta04) is from 2021 and incompatible with Android Studio 2022+; you must update it to at least 7.x. JCenter is deprecated and removed from bintray—allprojects block still references it. WebView sandboxing differs per Android OS (7.0+), so JavaScript→Java calls may fail on old devices. No ProGuard/R8 config visible, so minification may break reflection in JavaScriptInterface. Rich_editor.js expects document.execCommand() to be available (deprecated in modern browsers, works on Android WebView via legacy code path).

💡Concepts to learn

  • WebView JavaScript Bridge (JavaScriptInterface) — RichEditor.java exposes Java methods to JavaScript via @JavaScriptInterface, allowing setEditorHeight() (Java) to call underlying JS; understanding the bridge is essential to modify editor behavior or add features
  • contenteditable and document.execCommand() — Rich_editor.js relies on HTML5 contenteditable attribute and deprecated but still-functional execCommand() API to implement formatting (bold, italic, etc.); knowing these is critical to extend or debug editor features
  • WYSIWYG Editor Architecture — RichEditor implements a classic WebView-based WYSIWYG pattern (user sees formatted text while editing); understanding this pattern helps avoid common pitfalls like state loss or rendering lag
  • Android WebView Sandboxing & Security Context — WebView executes JavaScript in a restricted security context per Android OS version; changes to JavaScriptInterface or asset loading can break on certain API levels, especially <7.0
  • Asset Loading in Android Libraries — Rich_editor.js, editor.html, and CSS files are bundled in richeditor/src/main/assets/; understanding how Android loads assets from AAR libraries is key to modifying or replacing these files
  • Gradle AAR Publishing & Maven Central — Library is published as jp.wasabeef:richeditor-android to Maven Central; understanding Gradle build config and AAR generation helps debug library builds or CI/CD setup
  • DOM State Persistence in WebView — RichEditor must preserve contenteditable DOM state across lifecycle events; WebView.saveWebViewState() and JavaScript serialization are non-obvious ways to handle undo/redo and content recovery
  • cjwirth/RichEditorView — Official iOS counterpart of this library; wasabeef/richeditor-android explicitly references it in README, same WYSIWYG feature set, useful for cross-platform teams
  • zcweng/SweetRichEditor — Alternative Android rich text editor using WebView approach; similar contenteditable pattern but different API and feature set
  • fujianlian/PagerBottomTabStrip — By same author (wasabeef); demonstrates Gradle/Maven library publishing patterns relevant to understanding richeditor-android's build setup
  • android/android-samples — Official Android WebView examples; critical for understanding WebView security, JavaScript bridge, and Android OS version quirks that affect richeditor-android
  • tinymce/tinymce — Industry-standard rich editor (JavaScript); richeditor-android is a mobile port/wrapper of similar contenteditable-based WYSIWYG concepts

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive unit tests for RichEditor.java core functionality

The repo has minimal test coverage - only ApplicationTest.java and UrlDecoderTest.java exist. RichEditor.java is the main component but lacks unit tests for critical methods like setText(), getHtml(), insertImage(), etc. This improves code reliability and makes future refactoring safer.

  • [ ] Create richeditor/src/test/java/jp/wasabeef/richeditor/RichEditorTest.java
  • [ ] Add unit tests for HTML/text manipulation methods (setText, getHtml, getPlainText)
  • [ ] Add tests for formatting methods (setBold, setItalic, setUnderline, etc.)
  • [ ] Add tests for edge cases (empty content, null inputs, special characters)
  • [ ] Update build.gradle to ensure JUnit dependency is included

Add GitHub Actions workflow for automated Android builds and testing

The .github/FUNDING.yml exists but there's no CI/CD pipeline. The project uses Gradle and has test files but no automated testing on commits. Adding a GitHub Action would catch regressions early and ensure build consistency across Android versions.

  • [ ] Create .github/workflows/android-build.yml
  • [ ] Configure workflow to run on push/pull requests to main branches
  • [ ] Add steps to build richeditor module with ./gradlew build
  • [ ] Add steps to run unit tests with ./gradlew test
  • [ ] Add steps to run Android instrumented tests with ./gradlew connectedAndroidTest (optional emulator setup)

Extract and document rich_editor.js JavaScript API in README with usage examples

The richeditor/src/main/assets/rich_editor.js file implements the core WYSIWYG functionality but the README only shows high-level Java API. Contributors and users need documented JS methods, event handling, and HTML/CSS customization options. This reduces onboarding friction for customization requests.

  • [ ] Review rich_editor.js and document all public JavaScript functions (e.g., execCommand signatures, event handlers)
  • [ ] Add 'JavaScript API Reference' section to README.md with method signatures and examples
  • [ ] Document how to customize editor.html, normalize.css, and style.css for custom styling
  • [ ] Add example showing how to listen to content change events and interact with native Android code
  • [ ] Include sample HTML/CSS customization snippets in docs/

🌿Good first issues

  • Add unit tests for richeditor/src/test/java/richeditor/UrlDecoderTest.java—only one test file exists; add tests for RichEditor.java public methods (setBold, setItalic, insertImage, etc.) in richeditor/src/test/ to catch regressions
  • Update build.gradle: replace 'com.android.tools.build:gradle:4.2.0-beta04' with latest stable (7.4.0+) and remove deprecated JCenter from allprojects repository block, test against modern Android Studio
  • Document JavaScript API: richeditor/src/main/assets/rich_editor.js has no comments; add JSDoc headers to each function (setBold(), insertImage(), getHtml(), etc.) so contributors understand the Java↔JS contract

Top contributors

Click to expand
  • @wasabeef — 76 commits
  • @richfuns — 5 commits
  • [@Chris Dolge](https://github.com/Chris Dolge) — 3 commits
  • @Kashish-Sharma — 2 commits
  • [@Roi Bareket](https://github.com/Roi Bareket) — 2 commits

📝Recent commits

Click to expand
  • ce152b9 — Merge pull request #256 from wasabeef/mc (wasabeef)
  • 6b61c12 — chore: add settings for maven central (wasabeef)
  • c8b19b7 — Merge branch 'master' of https://github.com/wasabeef/richeditor-android (wasabeef)
  • b14e011 — update gradle wrapper (wasabeef)
  • 9e8224a — Update README.md (wasabeef)
  • f1bff74 — Update README.md (wasabeef)
  • fe5bcbc — Update README.md (wasabeef)
  • a6a82e1 — add logo (wasabeef)
  • b7813b9 — Merge pull request #244 from wasabeef/clean-up (wasabeef)
  • f72d79e — update readme (wasabeef)

🔒Security observations

The RichEditor Android project has several security concerns that require immediate attention. The most critical issue is the use of an outdated, unsupported beta version of the Android Gradle Plugin (4.2.0-beta04) from 2018, which contains known vulnerabilities. Additionally, the project still references the deprecated JCenter repository which was shut down in 2021. The integration of WebView with HTML/JavaScript assets presents a medium-risk XSS vulnerability that requires proper input sanitization and security headers. Several files critical for security review (AndroidManifest.xml, RichEditor.java implementation details) were not fully provided, limiting the assessment scope. Overall security posture is below average and requires modernization of build tools, dependencies, and implementation of security best practices for WebView-based content.

  • High · Outdated Gradle Build Tool — build.gradle (classpath 'com.android.tools.build:gradle:4.2.0-beta04'). The project uses Gradle 4.2.0-beta04, which is a beta version from 2018. This version contains known security vulnerabilities and is no longer supported. Beta versions should never be used in production builds. Fix: Update to the latest stable version of the Android Gradle Plugin (currently 7.x or 8.x). Use a stable release version, not beta versions.
  • High · JCenter Repository Still Active — build.gradle (jcenter() in repositories). JCenter was officially shut down on May 1st, 2021. The build.gradle file still includes jcenter() in repositories, which is deprecated and no longer functional. This can cause build failures and security issues as packages may not be available. Fix: Remove jcenter() from all repository declarations. Rely only on google() and mavenCentral() repositories.
  • Medium · Potential XSS Vulnerability in WebView Integration — richeditor/src/main/assets/ (editor.html, rich_editor.js, style.css). The project includes JavaScript files (rich_editor.js) and HTML assets (editor.html) that are loaded into a WebView. If user input is not properly sanitized before being injected into the WebView, this could lead to Cross-Site Scripting (XSS) attacks. Fix: Implement strict input validation and sanitization. Ensure all user-generated content is properly escaped before being passed to the WebView. Consider using Content Security Policy (CSP) headers in the HTML asset.
  • Medium · Missing Security Headers in WebView HTML — richeditor/src/main/assets/editor.html. The editor.html asset file likely lacks security headers such as Content-Security-Policy, X-Content-Type-Options, and X-Frame-Options which could increase vulnerability to various attacks including XSS and clickjacking. Fix: Add appropriate security headers to the HTML template. Include Content-Security-Policy to restrict resource loading, and other security-related meta tags.
  • Low · Debug Configuration Not Visible — richeditor/src/main/AndroidManifest.xml, sample/src/main/AndroidManifest.xml. The AndroidManifest.xml files are present but not provided for review. Without seeing the manifest files, it's unclear if debug flags, debuggable mode, or other security settings are properly configured. Fix: Review manifest files to ensure: debuggable=false in production, proper permissions are requested, and no unnecessary permissions are granted. Use principle of least privilege.
  • Low · No Certificate Pinning Visible — richeditor/src/main/java/jp/wasabeef/richeditor/RichEditor.java. If the RichEditor communicates with remote servers for loading images or other resources, there is no evidence of certificate pinning implementation, which could allow man-in-the-middle attacks. Fix: If the editor loads remote resources, implement certificate pinning using libraries like OkHttp's CertificatePinner to prevent MITM attacks.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · wasabeef/richeditor-android — RepoPilot