seppzzz/html-editor-scroll
最新稳定版本:2.0.0
Composer 安装命令:
composer require seppzzz/html-editor-scroll
包简介
Provides a Silverstripe TinyMCE plugin that records the last scrolled or edited position in the HTML editor field. This is especially useful for editing long content, preventing the need to search and scroll to your previous position after saving.
README 文档
README
Provides a Silverstripe TinyMCE plugin that records the last scrolled or edited position in the HTML editor field. This is especially useful for editing long content, preventing the need to search and scroll to your previous position after saving. Also adds a Scroll-To-Top Button to TinyMce.
Requirements
SilverStripe 4 / 5 / 6
Installation
You can install the module via Composer by specifying the appropriate branch alias or version constraint for your SilverStripe version:
| SilverStripe Version | Composer Command |
|---|---|
| ^6.0 | composer require seppzzz/html-editor-scroll |
| ^5.0 | composer require seppzzz/html-editor-scroll:dev-silverstripe_5 |
| ^4.0 | composer require seppzzz/html-editor-scroll:dev-silverstripe_4 |
Alternatively, you can download the .zip file from GitHub, extract it, rename the extracted folder to html-editor-scroll,
and copy it to your vendor/seppzzz/ directory.
After installation, run the following commands to rebuild your SilverStripe project and expose the necessary assets:
# Rebuild the database and regenerate the manifest vendor/bin/sake dev/build # Expose the module's public assets vendor/bin/vendor-expose
Documentation
By default, every HTMLEditorField uses the default TinyMCEConfig cms. To enable this plugin for a custom TinyMCEConfig, add the following code to your SilverStripe configuration:
use SilverStripe\Forms\HTMLEditor\TinyMCEConfig; use SilverStripe\Core\Manifest\ModuleLoader; // Load the module where the scroll plugin is located $editorScrollModule = ModuleLoader::inst()->getManifest()->getModule('seppzzz/html-editor-scroll'); // Enable the scrollposition plugin in the custom TinyMCE configuration TinyMCEConfig::get('mycustomconfig')->enablePlugins([ 'scrollposition' => $editorScrollModule->getResource('dist/javascript/mceplugin/editorscrollpos/scroll-pos-mce-plugin.js'), ]);
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2024-09-04