{"id":25933445,"url":"https://github.com/simplygreatwork/textbase","last_synced_at":"2025-03-04T00:53:54.230Z","repository":{"id":193175518,"uuid":"345784864","full_name":"simplygreatwork/textbase","owner":"simplygreatwork","description":"Textbase is a clean, simple, composable, event-driven, rich text editor framework for the web which can be extended with custom block and inline elements in a non-opinionated manner.","archived":false,"fork":false,"pushed_at":"2021-05-16T21:54:56.000Z","size":692,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-01-31T19:49:25.700Z","etag":null,"topics":["content-editable","editor","event-driven","html5-editor","rich-text-editor","rte","text-editor","wysiwyg","wysiwyg-editor","wysiwyg-html-editor","wysiwyg-js-editor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simplygreatwork.png","metadata":{"files":{"readme":"readme.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}},"created_at":"2021-03-08T20:24:23.000Z","updated_at":"2024-01-16T22:12:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f75510d0-88a4-4014-9113-1583aaadeffa","html_url":"https://github.com/simplygreatwork/textbase","commit_stats":null,"previous_names":["simplygreatwork/textbase"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplygreatwork%2Ftextbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplygreatwork%2Ftextbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplygreatwork%2Ftextbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplygreatwork%2Ftextbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplygreatwork","download_url":"https://codeload.github.com/simplygreatwork/textbase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241763719,"owners_count":20016162,"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":["content-editable","editor","event-driven","html5-editor","rich-text-editor","rte","text-editor","wysiwyg","wysiwyg-editor","wysiwyg-html-editor","wysiwyg-js-editor"],"created_at":"2025-03-04T00:53:52.778Z","updated_at":"2025-03-04T00:53:54.218Z","avatar_url":"https://github.com/simplygreatwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## TextBase\n\n## Goals\n\n- Create a robust rich text editor for the web which is a joy to develop and extend. A work in progress.\n- Be able to quickly configure or extend the editor in a straightforward manner with minimal learning and reading docs.\n- Embrace progressive enhancement and feature detection.\n- Use the concept of code over configuration for initializing the editor.\n- Aim to follow the concept that flat is better than nested.\n- Make it incredibly easy to add new features like inline elements and new block elements.\n- Uses an event-based infrastructure based around a shared message bus.\n\t- To add new kinds of content, use the message bus to hook into the system instead of subclassing or creating plugins.\n\t- Cards and atoms can subscribe to events such as \"card-will-enter:calendar\" or \"atom-will-exit:date\"\n\t- This allows for much less overhead and scaffolding to extend the editor with new kinds of content.\n\n## Demo\n\nA [simple environment](https://simplygreatwork.github.io/textbase/) is available on Github Pages. This demo should always be serving a stable branch of the main branch. e.g. 2021-03-31. Clear you cache.\n\n## What this project is not currently\n\n- This project does not use document.executeCommand. All editing is achieved by manipulating the DOM directly.\n- This project has only been tested with Google Chrome. Will branch out soon.\n- This project does not yet use a JSON data model.\n\t- It's quite simple and uses HTML DOM nodes as the model.\n- This project does not yet support collaboration.\n\t- In the future, this project might potentially use differential synchronization.\n\n## Please help with\n\n- Testing on other platforms, perhaps using Browser Stack. This project has currently only been tested in Google Chrome.\n- Writing custom cards and atoms. Design blocks and content blocks would be nice to have. Atoms for storing metadata records would also be nice to have.\n\n## Highlights\n\n- Document integrity is ruled by a content scanner to ensure that the content is in the form we expect after each edit.\n\t- The message \"content-did-change\" is emitted with the changed begin and end nodes, and the scanner scans, validates, and corrects that section of the document, as needed.\n- Content deletion is pluggable by listening to \"delete-requested\" on the bus. This way cards and atoms can handle their own deletion.\n- Extending the editor with cards and atoms is done with listening to \"card-will-enter\", \"card-will-exit\", on the bus.\n\t- This approach is not opinionated and therefore you can manage initialization and lifecycle of cards and atoms inside these event handlers.\n- History selection restoration is managed by listening to the history undo manager on the system bus.\n\n## Roadmap\n\n- Allow cards and atoms to have editable content managed by the history support. At the moment, the content of cards and atoms is not editable.\n- Potentially stop using the browser's MutationObserver and create a custom mutation event system in preparation for collaboration features.\n\n## Prior Art\n\nI have investigated and dabbled with many rich text editing frameworks before deciding to create my own.\n\n- Mobiledoc Kit\n- SpyText\n- editable.js\n- Scribe\n- Quill\n- ProseMirror\n- Substance\n- and many others...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplygreatwork%2Ftextbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplygreatwork%2Ftextbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplygreatwork%2Ftextbase/lists"}