Skip to content

Design a rich text editor (frontend)

Design a rich text editor for the web: bold, lists, links and headings, pasting from other apps, undo and redo, and saving what was written.

System designFrontend and full stackCollaborationSeniorStaff

What to work through

Work through a rich text editor as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Format text: bold, italic, links, headings and lists
  • Paste content copied from other apps and web pages, keeping the formatting the editor supports
  • Undo and redo every change, formatting and pastes included
  • Save what was written and open it again exactly as it was
  • Accept typing in any language, input methods for scripts such as Japanese included

Constraints to discuss

  • A keystroke shows in the same frame, the editor's own work under 10 milliseconds
  • A click on a toolbar button answers within 200 milliseconds
  • Pasted content never runs a script or carries unsafe markup into the page
  • Spell check, screen readers and touch keep working inside the editor
Need a starting point?

Watch for these common gaps as you prepare:

  • Treating the document as one big string
  • Relying on the editable area alone, with the browser's own formatting commands and undo
  • Pasting HTML without cleaning it, or cleaning it after it is in the page
  • Redrawing the editor on each keystroke, so the cursor jumps and input methods break
  • Naming an editor library as the whole answer instead of a building block
Read: Frontend system design interview questions, and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

Your next question

AI systemsDesign a ChatGPT-style chat (frontend)Search and autocompleteDesign an autocomplete search box (frontend)CollaborationDesign a calendar (frontend)Messaging and notificationsDesign a chat app (frontend)
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practice next.