From b8f839c4041ad4510357db2cc6be41fc51e3b2a5 Mon Sep 17 00:00:00 2001 From: Zihua Li Date: Sat, 16 Mar 2024 10:10:06 +0800 Subject: [PATCH] Remove outdated website guides --- ...omparison-with-other-rich-text-editors.mdx | 70 ------------------- packages/website/src/data/guides.tsx | 4 -- packages/website/src/pages/styles.scss | 2 +- 3 files changed, 1 insertion(+), 75 deletions(-) delete mode 100644 packages/website/content/guides/comparison-with-other-rich-text-editors.mdx diff --git a/packages/website/content/guides/comparison-with-other-rich-text-editors.mdx b/packages/website/content/guides/comparison-with-other-rich-text-editors.mdx deleted file mode 100644 index 70c2e95f0c..0000000000 --- a/packages/website/content/guides/comparison-with-other-rich-text-editors.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Comparison with Other Rich Text Editors ---- - -## CKEditor and TinyMCE - -CKEditor and TinyMCE are both very widely used, having been around for over a decade. Quill introduces several new ideas that separate it from these traditional editors: - -- It treats `contenteditable` as an input, not a complete editor or API. Browsers never fully agreed on or specified the complete scope of `contenteditable`. Left to their own interpretations, each ended with different implementations that featured their own quirks and a proliferation of bugs, earning `contenteditable` deserved notoriety. It is still possible today to crash an entire browser using `contenteditable` APIs. - -- It offers a substantive API on top of the DOM. Most of CKEditor and TinyMCE's APIs offer little more than syntactic sugar on top of existing DOM APIs. Quill maintains an internal document model and does not rely on the DOM as the source of truth, allowing it to offer far more powerful and relevant APIs for text editing. - -- It allows customization and new additions of formats and content. Quill considers the web as a target output, not just paper. Therefore, in addition to supporting traditional formats commonly found in word processors (like bold, italics and lists), Quill allows the definition of entirely new formats and content not previously imagined. Quill's users have already added customizations to embed slide decks, interactive checklists and 3D models. - -Although there are differences between them, CKEditor and TinyMCE are compared together because they differ from Quill in similar ways. Nevertheless, CKEditor or TinyMCE might be a better choice if: - -- You need to support very old browsers. Quill follows the policy of many other JavaScript libraries of supporting the latest two versions of each major browser. - -- You need to set or edit the underlying HTML directly with arbitrary HTML. Quill does not support arbitrary modifications to its contents with `innerHTML` as it leads to surprising and buggy behavior. Instead, it provides a consistent [API](/docs/api) for modification and the ability to define new formats and content through [Parchment](https://github.com/quilljs/parchment/). - - -## Draft - -Draft is often compared with Quill, but Draft, by its own description, is a "Rich Text Editor Framework for React." It provides the building blocks to create an editor, but is not one ready to use by itself. It is still worthwhile to compare Quill's internals with Draft however: - -- Prior to Quill 1.0, Draft allowed more customization over its content and document model, but this is no longer the case. Quill now exposes its document model, called [Parchment](https://github.com/quilljs/parchment), and allows customization to an even deeper level than Draft at this point. [Cloning Medium with Parchment](/guides/cloning-medium-with-parchment/) is a great demonstration of what is possible with Parchment. - -- Draft organizes nodes into two levels: block and inline. Parchment also has a block and inline layer, but inline nodes can be nested, allowing semantic output such as `Stronger` whereas the equivalent in Draft must use just one inline format node and utilizes inline styles: - - ```html - - Stronger - - ``` - -- Draft's API inherits primitives and ideas from React that are more appropriate for general websites. Quill's only use case is rich text content allowing for a simpler API geared specifically for that use case. API simplicity is subjective, so the best metric for you might be to think of a common task, like bolding a range of text, and try to figure out how to do it in Quill and how to do it in Draft. - -- React, React DOM, and immutable.js are dependencies of Draft which add a lot of weight for users not already using React. - -The main difference is still that Quill is a ready to use rich text editor, with user interactions considered and interfaces thought out and implemented. Draft provides the building blocks but you will have to implement all the pieces above the data layer yourself. - - -## ProseMirror - -ProseMirror is relatively new but has already captured significant attention, being built by the same author of CodeMirror. That being said a robust comparison of the product and implementation is premature since ProseMirror is still in the development stages, as noted in their README: - -> NOTE: This project is in BETA stage. It isn't thoroughly tested, and the API might still change across 0.x releases. You are welcome to use it, but don't expect it to be very stable yet. - -Instead we will compare the ideas and goals: - -- Both Quill and ProseMirror implement and maintain a data model to operate on with APIs, instead of allowing users to modify the DOM directly. - -- Support realtime collaboration. Quill users are already doing so in production. - -- Quill's architecture is more modular, allowing for easier customization of internals. Core modules that handle basic functionality like copy/paste and undo/redo can be swapped out in Quill. - -- ProseMirror favors broad exposure of API methods, configurations and variables. Quill treats developers as users and designs an organized API surface, judicious in what to expose, sometimes hiding confusing methods or creating new ones that unify several internal operations. - - -## Trix - -Trix is another newly released editor that has adopted many modern ideas in rich text editing. This includes a data model on top of the DOM and treating `contenteditable` as an input, which Quill and other modern editors also embrace. In addition, Quill offers some significant advantages over Trix: - -- More [format](/docs/formats/) support. Quill supports all formats found in Trix, and also supports text color, font, background, size, superscript, subscript, underline, text alignment, text direction, syntax highlighted code, videos, and formulas, which are not supported in Trix. - -- Allows customization of existing formats and content, or even adding new ones. Trix implements each format in one way, and allows no further customization. - -- Modularized internals that can be configured or even swapped out. Trix is architected as a monolith. - -- Trix offers one UI, that users likely will need to polish with custom CSS. Quill offers two beautiful, ready to use themes, one centering around a persistent [toolbar](/docs/themes/#snow) and one around a Medium-like [tooltip theme](/docs/themes/#bubble). diff --git a/packages/website/src/data/guides.tsx b/packages/website/src/data/guides.tsx index a36636c23a..4b6ba0ec07 100644 --- a/packages/website/src/data/guides.tsx +++ b/packages/website/src/data/guides.tsx @@ -19,10 +19,6 @@ const items = [ title: 'Designing the Delta Format', url: '/guides/designing-the-delta-format', }, - { - title: 'Comparison with Other Rich Text Editors', - url: '/guides/comparison-with-other-rich-text-editors', - }, { title: 'Upgrading to 2.0', url: '/guides/upgrading-to-2-0', diff --git a/packages/website/src/pages/styles.scss b/packages/website/src/pages/styles.scss index d6d1ed5856..b819189333 100644 --- a/packages/website/src/pages/styles.scss +++ b/packages/website/src/pages/styles.scss @@ -1474,7 +1474,7 @@ body:not(.home) .navbar-link:before { color: #1d1e30; } #sidebar-container a { - color: #9a9dae; + color: #797b82; display: block; } #sidebar-container a:hover {