{"id":18271593,"url":"https://github.com/dnewcome/richie","last_synced_at":"2025-10-24T14:57:27.281Z","repository":{"id":1041210,"uuid":"871343","full_name":"dnewcome/richie","owner":"dnewcome","description":"Richie is a Javascript rich text editor for mobile and desktop browsers","archived":false,"fork":false,"pushed_at":"2015-04-18T17:48:22.000Z","size":164,"stargazers_count":14,"open_issues_count":6,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-05T11:54:04.390Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dnewcome.github.com/richie-demo.html","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/dnewcome.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}},"created_at":"2010-08-30T03:36:14.000Z","updated_at":"2019-11-19T12:48:57.000Z","dependencies_parsed_at":"2022-07-29T08:28:57.284Z","dependency_job_id":null,"html_url":"https://github.com/dnewcome/richie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnewcome%2Frichie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnewcome%2Frichie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnewcome%2Frichie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnewcome%2Frichie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnewcome","download_url":"https://codeload.github.com/dnewcome/richie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279222,"owners_count":20912848,"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":[],"created_at":"2024-11-05T11:39:23.753Z","updated_at":"2025-10-24T14:57:27.200Z","avatar_url":"https://github.com/dnewcome.png","language":"JavaScript","readme":"# About\n\nRichie is a Javascript rich text editor for both mobile and desktop browsers.\nIt uses the HTML DOM directly and does not rely on contenteditable or designmode.\n\n# Status\n\nRichie is under development. Radical changes to the code are expected.\nDon't rely on this current development version.\n\n# Background and theory of operation\n\nAs mobile devices grow in capability, the desire to access rich internet \napplications written in HTML/Javascript is also growing. However despite \nthe growth in capability of these devices there are still some notable \ndeficiencies. One of these is a lack of the traditional editing mechanisms \n(designmode and contenteditable) used by current browser-based rich text\neditors such as TinyMCE and others.\n\nMobile devices such as the iPhone typically accept keyboard input only \nwhen a valid input control has focus on the page. In order to use an \neditor that relies on intercepting keyboard input, we have to fool the \ndevice into thinking that an input control is selected and waiting for \ninput. In the case of the iPhone, the onscreen keyboard doesn't display \nat all unless an input control is selected.\n\nThe second problem is that if we put an input control on the page somewhere to \nserve as the input target, the page will automatically scroll back to the input \ncontrol regardless of where we redirect the text on the page. This means that\nwe have to move the input control around to match where the user is expecting\nto see the insertion.\n\nRichie renders text by handling keyboard input and manually inserting the characters into a\nsection of the DOM, mimicking the behavior that is presented by an HTML document with \ndesignmode equal to 'on' or an HTML element whose contenteditable is set to true.\n\nThe text box movement is achieved using absolute positioning. The box is moved \naround the page as the cursor is moved. This allows focus to be maintained\nas the control is never removed from the DOM in order to change position.\n\n# Testing strategies\n\nManipulating the DOM one keystroke at a time can be particularly error-prone\nand subject to differences between browsers. Coupled with the desire to\nsupport many mobile browsers including the iPhone makes it vital to \nbe able to check for regressions quickly and easily. I'm proposing\nthe use of Selenium, which now supports the iPhone via a UIWebKitView\nas well as most desktop browsers.\n\n# Limitations\n\n * Buggy \n * No copy and paste\n\n# Bugs \n\n * Backspace cannot cross a node boundary, so removing bold text and then plain text is not currently possible, nor is it possible to cross a newline boundary.\n * The cursor position does not update\nwhen a newline is entered. The next character entered causes the cursor to jump. \n * Text wrapping does not occur at the end of the editor element. The cursor will wrap but \ntext continues to be inserted at the end of the previous line.\n * There is no way to randomly access a text selection using a touch gesture.\n\n# Future work\n\nThe current design manipulates the browser's DOM directly. I'm toying with \nthe thought of using a back buffer instead, and decoupling the data from the\nDOM entirely. This represents another layer of design complexity, so I think\nI'm going to pursue the simpler direct-DOM approach until it becomes apparent\nthat managing the DOM on different devices will indeed become too unwieldy.\n\nMost of the near term work will be focused on testing and fixing quirks\nwith the existing code. Features such as clicking to select are basically\nbroken right now. Copy and paste does not exist at all yet.\n\n# License\nRichie is provided under the MIT free software license. See LICENSE file for \nthe full text. Copyright 2010 [Dan Newcome](http://newcome.wordpress.com/).\n\n\n\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnewcome%2Frichie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnewcome%2Frichie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnewcome%2Frichie/lists"}