Rich Text Editor Decoupling State from DOM for Consistent Rendering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current rich text editors are limited in formatting capabilities and often result in inconsistent rendering across different browsers due to their dependency on the browser's document object model (DOM), leading to erratic highlighting and formatting issues, especially when the GUI is zoomed.

Innovation Solution

A rich text editor that stores content as data blocks and formatting states as separate feature data objects, allowing for independent rendering using APIs for various formatting styles, thereby decoupling the content state from the DOM and ensuring consistent rendering across browsers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the text editor stores document state with the browser's DOM, then the implementation is simple and browser-compatible, but the rendering becomes inconsistent across different browsers

Engineering Contradiction:
Improvebrowser compatibilityVSAvoidrendering consistency
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary layer (the text editor application) between the content and the DOM. Instead of storing document state directly in the browser-specific DOM, the application maintains its own data structures and only uses the DOM for rendering. This intermediary layer abstracts away browser differences and ensures consistent rendering across browsers by controlling how content is represented and manipulated, independent of underlying DOM variations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If the editor measures text portion in the GUI to determine highlighting, then the implementation is straightforward, but the highlighting becomes inaccurate when the GUI is zoomed or text wraps

Engineering Contradiction:
Improveimplementation simplicityVSAvoidhighlighting accuracy
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The patent creates a separate copy of the content in the application's data structures, independent of the GUI representation. Instead of measuring text portions directly in the GUI (which is subject to zooming and wrapping), the application maintains its own copy of the content with accurate positional information. This copy is then used to determine highlighting, ensuring accuracy regardless of GUI transformations.

Inventive Principle:
Principle #26Copying

3Device complexity

If the editor uses browser-specific DOM storage for document state, then the storage mechanism is simple, but the document renders differently across browsers

Engineering Contradiction:
Improvestorage mechanism complexityVSAvoidcross-browser rendering consistency
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent segments the document representation into two independent parts: (1) the application's own data structures that store content and state in a browser-independent manner, and (2) the DOM which is used only for rendering. This segmentation allows the application to maintain consistent internal representations across browsers while using the DOM solely as a rendering target, eliminating cross-browser rendering inconsistencies.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10204077B2Rich text editor
Publication Date: 2019.02.12 META PLATFORMS INC
  • US10204077B2 patent drawing
  • US10204077B2 patent drawing
  • US10204077B2 patent drawing

AI summary

The disclosure is directed to a rich text editor (“editor”) that facilitates generation and manipulation of rich text content. The editor can be integrated into an application, e.g., a social networking application, to support rich text content creation in the application. The application renders a document containing rich text content using a document object model (DOM). The editor stores a state of the document, e.g., features such as formatting style of content, separate from the DOM, thereby eliminating and/or minimizing any inconsistencies that can be caused due to storing the state with the DOM. The editor stores the content as multiple data blocks and the state as multiple feature data objects. A rendering component of the text editor renders the document by outputting the document into the DOM using the data blocks and the feature data objects. The rendering component includes APIs for rendering the document in various formatting styles.