Fork me on GitHub

CKEditor 5 – Text Selection Plugin Demo

How to test: Select some text in the editor, then click the Source toolbar button. The cursor position is preserved in the source view. Edit in source mode, place your cursor, then toggle back — the selection is restored in the WYSIWYG view.

Welcome to the Text Selection demo

This editor has the TextSelection plugin enabled. It preserves your cursor position and text selection when switching between the WYSIWYG and Source editing modes.

Try selecting a word or phrase in this paragraph, then click the Source button in the toolbar. You should see the corresponding position highlighted in the HTML source.

Similarly, place your cursor somewhere in the source view and toggle back to rich text — the cursor will land at the matching position in the document.

About Author

DrupalBook is a digital agency specializing in the design, development, and long-term support of scalable Drupal platforms for companies operating across multiple markets, languages, and teams.

DrupalBook.org

We work with organizations that treat Drupal not as a website builder, but as a core digital platform — one that must remain secure, extensible, and maintainable for years, not just until launch.

Our focus is architecture, content structure, and sustainable delivery, helping international companies build Drupal systems that support growth, complexity, and change.

DrupalBook began in 2010 as an open knowledge initiative focused on documenting real‑world Drupal site building and module development.

At a time when Drupal documentation was fragmented and often abstract, DrupalBook was created to explain how Drupal is actually used in production — content modeling, editorial workflows, performance optimization, and extensibility.

Over time, that work evolved from documentation into hands‑on delivery.

Organizations approached us not only to learn Drupal, but to build and maintain production platforms using the same principles we wrote about: clarity, structure, and long‑term thinking.

Today, DrupalBook operates as a boutique, engineering‑led Drupal agency, applying more than a decade of platform experience to real client systems.

We help international companies design, build, and operate Drupal platforms in environments where:

 

Our Core Services

Let’s Talk

If you are planning to:

We’re happy to start with a conversation.

Technical & architecture inquiries
Ivan Abramenko, Principal Drupal Architect
ivan.abramenko@drupalbook.org
Project inquiries
projects@drupalbook.org