kevingroeger/codeeditorfield
Composer 安装命令:
composer require kevingroeger/codeeditorfield
包简介
Code editor field for SilverStripe 4 - 6
README 文档
README
Creates an Ace Code Editor (https://ace.c9.io/)
Feel free to contribute, ask questions or report issues!
Requirements
- Silverstripe 4 - 6
- PHP 8+
Installation
composer require kevingroeger/codeeditorfield
Usage
$codeEditor = CodeEditorField::create('Title', 'Enter Source Code Here'); // set mode to html (default is json) $codeEditor->setMode('ace/mode/html'); // set mode to github (default is monokai) $codeEditor->setTheme('ace/theme/github'); $fields->addFieldsToTab('Root.Main', [ $codeEditor ]);
Themes & Modes
For available modes and themes, see resources/thirdparty/ace
Contribute
Credits
-
Thanks to @nathancox for creating this repository https://github.com/nathancox/silverstripe-codeeditorfield
-
Thanks to @jinjie for creating this repository https://github.com/jinjie/codeeditorfield
Both have stopped development, but this package is highly inspired by the great work of these two!
统计信息
- 总下载量: 9.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2023-05-22