ehaerer/rte-ckeditor-codesnippet

集成了 CKEditor 代码片段插件

安装: 331

依赖关系: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

语言:CSS

类型:typo3-cms-extension

1.0.1 2022-05-01 15:28 UTC

This package is auto-updated.

Last update: 2024-08-29 06:07:28 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

此扩展包含一个简单的 CkEditor 插件,允许编辑器在文本元素中插入代码标签。该插件本身是从 CKEditor 插入代码片段文档 中获取的,未做任何修改。

目前它集成了 插件版本 4.18.0

建议使用 fs_code_snippet 扩展来渲染网站前端的代码片段。

简要概述

First impression - what does it do?

安装

使用 composer require ehaerer/rte-ckeditor-codesnippet 或从 TER 下载扩展。

该扩展需要从 TER 或通过 Composer 安装 fs_code_snippet 扩展,它将自动安装。fs_code_snippet 用于在前端渲染输出。

用法

要启用插件,只需在您的 RTE.yaml 中进行以下更改,例如包括所需的 TsConfig 和可选地包括 fs_code_snippet 的 TypoScript 配置。

  1. 从扩展中导入配置到您的 RTE 配置
imports:
    - { resource: "EXT:rte_ckeditor_codesnippet/Configuration/RTE/Plugin.yaml" }
  1. 在您的 RTE 配置中启用插件
editor:
  config:
    extraPlugins:
      - codesnippet
  1. 可选:在网站包的配置中包含 fs_code_snippet 的 TypoScript 常量和设置,以在网站(前端)中渲染代码块
# constants
@import 'EXT:fs_code_snippet/Configuration/TypoScript/constants.txt'

# setup
@import 'EXT:fs_code_snippet/Configuration/TypoScript/setup.txt'
  1. 在后台编辑器和网站的前端检查结果。