studio
studio copied to clipboard
Update rich text editor to flexible, extensible rich text editing framework
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
What problem are we solving?
The Rich Text Editor in Studio has an extremely limited formatting set, allowing bold, italics, adding an image, and inserting a formula. However, additional text editing capabilities, from basics like underlining and adding <ol> and <ul> to adding a range of inline elements will allow for more robust use cases in the future.
Why this? Why now?
This project is to build a prototype Rich Text Editor, implemented within Kolibri Studio to replace the current version in the question editor. Although this project is for a prototype implementation for the current use case, we want to choose an editor framework/library that is customizable and extensible, and that will work across our products. The goal is to balance concrete use cases against future needs while avoiding early abstraction. Beginning with a specific use case (rather than building in the design system) will allow us to test our assumptions and address some known issues (see the community feedback in the "Context" section below).
There are two reasons we are doing this project now. First, it's a compliment to the HTML5 article rendering project, as both are prerequisites (and complimentary to one another) for allowing more robust long-form work to be done in Kolibri (such as long form answers, essays, etc.) as projects or assessments. Secondly, it is well-scoped for a GSoC project, and was funded by Google.
Outcomes
Specific needs that are being addressed, and how we will know when the project is done
A prototype rich text editor implemented in Kolibri Studio's question editor, replacing the current limited editor.
Acceptance Criteria
User workflows:
- A user can make use of basic formatting options: bold, italic, underline, strikethrough, subscript, superscript
- A user can structure content: ordered lists, unordered lists, headings
- A user can embed other content types: images, formulas, links
- Library choice and initial setup should provide a path for adding in inline elements in the future
- A user can easily copy and paste from MSWord or other text editors, with proper HTML parsing and cleanup as needed
- A user can undo and redo small amounts of changes
- A user can use proper keyboard navigation and shortcuts aligned with common rich text editor patterns
Technical requirements:
- Maintain backwards compatibility with current Markdown storage system
- WCAG compliance and internalization support including RTL language support and script support for non-Latin scripts
- Although we are not establishing performance benchmarks, we should choose a framework and approach that is performant on lower-resource and lower-cost devices
Constraints
Budgets, deadlines, technical limitations, and other constraints
- RTE Prototype will be built in Studio, and not abstracted into KDS or introduced anywhere else in the ecosystem
- GSoC project - prototype should be completed and replaced within Studio in the 12 week timeframe
Out of scope
- Robust version history management (such as restoring versions, viewing previous versions, and saving drafts), but should be considered when making technical decisions
- We are not concerned about supporting concurrent editing in the near future
- Introducing inline widgets, but should be considered when making technical decisions
Context
Relevant background information including Notion opportunities, Google docs, clearinghouse entries, slack conversations, Github issues, or any other relevant background information
[Rich text editors and articles](https://www.notion.so/Rich-text-editors-and-articles-83428c2038f64fa58e5919bd5f2fc49a?pvs=21)
Issues that @Blaine Jester filed after a community feedback session with PEAS.
- https://github.com/learningequality/studio/issues/4326
- https://github.com/learningequality/studio/issues/4325
- https://github.com/learningequality/studio/issues/4328