prgfx / neos-textpartlanguage
Neos 包,用于将 ckeditor5-language 插件集成到 CKEditor 中,以便为特定语言的内容添加标签
v0.3.0
2023-02-20 12:55 UTC
Requires
- neos/neos-ui: ^8.2
README
Prgfx.Neos.TextPartLanguage
此包允许编辑器为选定的文本添加语言标签,有助于辅助技术进行发音,并实施 WCAG 3.1.2 语言部分 规范。
composer require prgfx/neos-textpartlanguage
此插件基于 @ckeditor/ckeditor5-language,并进行了必要的适配以与 Neos 后端一起使用。
使用方法
为节点属性启用它
'Neos.Demo:Content.Text': properties: text: ui: inline: editorOptions: textLanguages: true
或设置特定属性
'Neos.Demo:Content.Text': properties: text: ui: inline: editorOptions: textLanguages: languages: de: German en: My.Package:Main:textLanguages.languages.en fr: French gr: ~ placeholder: My.Package:Main:textLanguages.placeholder
配置
默认情况下,此插件提供在 Neos.Neos.userInterface.availableLanguages
中配置的系统语言,但可以在 Neos.Neos.Ui.frontendConfiguration.'Prgfx.Neos.TextPartLanguage:languages'
中设置不同的默认值。
外观
在后台,此插件通过包含在 prototype(Neos.Neos:Page).head.stylesheets.textPartLanguage
中的样式表下划线所有标记的文本元素,您可以禁用此功能,如果您不需要或想应用自定义样式。