Drupalで、デフォルト設定では記事作成時に、文字色をつけることができません。
モジュールを追加する必要があります、
単純に追加するだけでは無理だったので、やり方をメモ残します。
drupal9で記事エディタで文字色を設定する方法
colorbuttonとpanelbuttonというモジュールをダウンロード

CKEditor Color Button
Integrates the CKEditor ColorButton plugin to CKEditor for Drupal 8 and Drupal 9. Allows users to add color to text or background color behind it.
CKEditor Panel Button
Adds in the Panel Button plugin for CKEditor. This is required by plugins that need panel button to work, like Color Button.
moduleフォルダに解凍して配置
ZIP解凍などしてmoduleに配置する。(上部イメージはWindowsServerのiisですがApacheなどでも同じ。)
drupalの管理画面でインストール(たぶんエラーが出るはず)
「libraryフォルダに4.5.6のバージョンはまずいれとけ」的なエラーがでます。
URLも親切にかいているので、素直にそのままうページにアクセスしダウンロードしましょう。
4.5.6を入手
https://ckeditor.com/cke4/addon/colorbutton
http://ckeditor.com/addon/panelbutton
それぞれダウンロードして解凍します
drupalにlibrarysフォルダをつくる
この中に入手した4.5.6のフォルダをそれぞれ配置する
エディタの設定する
ホーム>管理>環境設定>コンテンツ作成 フルHTML(推奨)です
ドラッグアンドドロップでアクティブツールバーに配置して保存します。
確認
記事作成でエディタのツールバーにあれば成功です。
コメント