Add default buttons of the TinyMCE WSYWIG

Đang mở
#216 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với trang tài liệu WYSIWYG được liên kết trong issue và so sánh các tùy chọn được tài liệu hóa với các giá trị mặc định của Directus được mô tả ở đây. Ghi lại các nút mặc định trên thanh công cụ và giải thích cách cấu hình các định dạng phông chữ cũng như các tùy chọn TinyMCE bổ sung; công việc được xem là hoàn tất khi trang này trình bày rõ cả các giá trị mặc định và các ví dụ tùy chỉnh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
24
Fork
90
Merge trung bình
3 ngày 22 giờ
Pull request đã merge (30 ngày)
19

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của directus/docs

Tất cả issue của directus/docs

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.