levmyshkin/ckeditor5-textselection
最新稳定版本:1.0.1
Composer 安装命令:
composer require levmyshkin/ckeditor5-textselection
包简介
A plugin that makes CKEditor 5 keep its text selection when switching between Visual and Source mode.
README 文档
README
A plugin that makes the editor keep its text selection when switching between WYSIWYG and Source mode, and scrolls the selection into the viewport.
Inspired by the CKEditor Text Selection plugin.
This plugin also works with the CKEditor 5 CodeMirror Source Editing plugin.
Demo
Open demo/index.html in a browser to try the plugin with CKEditor 5 loaded
from CDN. Select text, toggle Source mode, and see the selection preserved.
License
Licensed under the terms of the GPL-2.0 License.
Structure
ckeditor5-textselection/
├── build/ # Compiled JS bundle (output of webpack)
│ └── textSelection.js
├── src/ # Plugin source code
│ ├── index.js # Plugin entry point (exports default object)
│ └── textselection.js # Plugin implementation
├── package.json
└── webpack.config.js
Building
The webpack build uses the CKEditor 5 DLL Reference Plugin to integrate with
Drupal's CKEditor 5 DLL system. Instead of bundling CKEditor 5 core modules, the
built file delegates to CKEditor5.dll at runtime — the shared library that
Drupal core provides on every page with a CKEditor 5 instance.
The DLL manifest (ckeditor5-dll.manifest.json) is sourced from the ckeditor5
npm package which is included as a dev dependency.
npm install npm run build # production (minified) npm run build:dev # development (unminified) npm run watch # watch mode
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2026-05-02