1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Wisywigエディタ「Redactor」にプラグインを追加する

Posted at

こんなTips要らないだろって人も多いと思うんですが
こんな基本的なことも分からなかったので備忘録しておきます。

CraftにおけるWISYWIG

リッチテキストとしてスタイルを変えたりImageを挿入したり出来るウィジウィグですが
本家Pixel & TonicからはRedactorもしくはCKEditorというやつが公開されてます。

Redactor導入

Craft2.xの時はRedactor標準装備だったのですが、Craft3からはそうでなくなったようなのでプラグインストアから導入します。

スクリーンショット 2018-08-10 12.59.12.png

裏でcomposerが動いて勝手に入れてくれます。便利。楽。

プラグインをゲットする

Redactorの公式?サイトのプラグインライブラリで欲しいものをゲットします。
RedactorPlugins

これもcomposerとかで出来るんでしょうけど
よく分かんなかったのでzipをダウンロード、サーバにアップという手順を踏みました。
今回はfontの色とサイズ、alignの3つです、中にはjsが入ってるっぽいです。

スクリーンショット 2018-08-10 13.04.02.png

解凍するとそのままアップ出来る形になってるのでそのままアップします。

プラグインをアップロード

どこにアップすればいいのか分からない問題

色々調べた結果


cd craft/config/redactor/
mkdir plugins

とディレクトリを切ってあげて、この中に放り込めばいいそうです。

スクリーンショット 2018-08-10 13.10.30.png

確認

Redactorタイプのフィールドを追加して確認します。

スクリーンショット 2018-08-10 13.11.54.png

出来ました。

終わり。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?