Add default buttons of the TinyMCE WSYWIG

未关闭
#216 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
停滞
领域
documentation

调研方向

从 issue 中链接的 WYSIWYG 文档页面开始,并将其中记录的选项与此处描述的 Directus 默认值进行比较。记录默认的工具栏按钮,并说明如何配置字体格式和其他 TinyMCE 选项;当页面清楚地涵盖默认值和自定义示例时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

content-improvement

Summary

In https://directus.io/docs/guides/data-model/interfaces#wysiwyg

It would be great that the user had information of what options are currently being displayed by default in said field, in case there's any specific they want to remove, and also to give an idea of how to add extra fields, as it's a bit confusing because the TinyMCE docs and how Directus handles said info is different:

Example

TinyMCE example:

<script>
   tinymce.init({
   selector: '#editor',
   toolbar: 'bold italic underlined | h1 h2 h3 | numlist bullist removeformat blockquote | link  image media code | fullscreen',
   height: '100px'
       });
</script>

How Directus handles it:

{
    "toolbar": "bold italic underlined | h1 h2 h3 | numlist bullist removeformat blockquote | link  image media code | fullscreen"
}

And, for some reason, also the template given by Directus inside the field configuration is:

{
    "font_size_formats": "8pt 10pt 12pt 14pt 16pt 18pt 24pt 36pt 48pt",
    "font_family_formats": "Arial=arial,helvetica,sans-serif; Courier New=courier new,courier,monospace;"
}

Result

Under Options override

The one that Directus currently has by default, and the one that should be shown in the docs is something like:

This is the group of buttons offered by Directus:
"toolbar": "bold italic underlined h1 h2 h3 numlist bullist removeformat blockquote link image media code fullscreen"

Ideally it would also mention other options like font_size_formats, or at least give some information on how to use those fields in Directus.

For example:

Image
主要语言
TypeScript
星标
24
派生
90
平均合并
3 天 22 小时
30 天内合并 PR
19

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

directus/docs 的其他 Issue

查看 directus/docs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。