Add default buttons of the TinyMCE WSYWIG

Offen
#216 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
45/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Bereich
documentation

Rechercherichtung

Beginne mit der im Issue verlinkten WYSIWYG-Dokumentationsseite und vergleiche deren dokumentierte Optionen mit den hier beschriebenen Directus-Standardwerten. Dokumentiere die standardmäßigen Toolbar-Schaltflächen und erkläre, wie Schriftformate und zusätzliche TinyMCE-Optionen konfiguriert werden; die Aufgabe ist abgeschlossen, wenn die Seite sowohl die Standardwerte als auch Beispiele zur Anpassung klar abdeckt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
TypeScript
Sterne
24
Forks
90
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
19

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus directus/docs

Alle Issues in directus/docs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.