A minimal, client-side web app for visually comparing two blocks of text using CodeMirror and Mergely.
text-compare provides a lightweight browser-based diff/merge interface that highlights differences between two text inputs. It uses CodeMirror for editable text areas and Mergely for visual diff rendering.
- Mergely — Visual diff/merge engine used for side-by-side comparison.
- CodeMirror 5 — Browser-based code editor used for editable panels.
- Side-by-side text comparison
- Syntax highlighting (via CodeMirror)
- Uses Mergely for diff/merge visualization
- No backend — runs entirely in the browser
-
Clone the repository:
git clone https://github.com/<your-username>/text-compare.git cd text-compare
-
Serve the folder and open in your browser (recommended):
# Python 3 python3 -m http.server 8000 # then open http://localhost:8000 in your browser
Opening
index.htmldirectly from the filesystem may work in some browsers, but serving via HTTP avoids cross-origin issues.
- Main entry:
index.html - Styling:
sytle.css(note: file name issytle.cssin the repo) - Vendor CSS:
css/bootstrap.min.css,css/codemirror.min.css,css/mergely.css - Vendor JS:
js/jquery.min.js,js/bootstrap.bundle.min.js,js/codemirror.min.js,js/mergely.jsand small helper scripts injs/
To modify behavior, edit index.html and the scripts in js/ and then reload the page.
Contributions are welcome. Please open an issue or a pull request with a clear description of your change.
This project is licensed under the MIT License — see the LICENSE file for details.
⭐ If you find this tool useful, please consider giving it a star on GitHub!
