Add default buttons of the TinyMCE WSYWIG

オープン
#216 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
19

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

directus/docs のほかの issue

directus/docs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。