Code Fences Highlighting Buttons Plugin

Hey guys,
I’ve created a plugin for Discourse, which adds additional code fences and syntax highlighting buttons to the composer toolbar.
The plugin, documentation and all future updates can be found here: GitHub - ThomDietrich/discourse-plugin-code-fences-buttons: Discourse Plugin: Code Fences Buttons (cfbtn)

The available buttons in your toolbar are configured through the plugin settings. Currently there is one javascript option and one with free to choose syntax highlighting. Options are easily extendable, just duplicate one of the two. Pull requests welcome!

「いいね!」 15

このプラグインがパネルにアイコンを表示しなくなりました。直し方をご存知の方がいらっしゃいますか?

「いいね!」 1

plugin.rb ファイルに必要なアイコンを指定していないようです。ファイルの上部に以下のような行があるはずです。

register_svg_icon "icon-name" if respond_to?(:register_svg_icon)

これらは Discourse の旧バージョンでは必要ありませんでしたが、現在は必要です。

また、アイコン名が時間とともに変更されていることも確認しました。おそらく Font Awesome の仕様変更によるもので、新しい名前を見つけるまで、私のプラグインのアイコンの一部が表示されなくなっていました。

「いいね!」 2

アイコンの問題は修正され、プラグインは再び正常に動作することが確認されました :slight_smile:

「いいね!」 2

素晴らしいプラグインですね!

カスタムボタン設定で、カンマ区切りのリストを受け取り、エディタ内のボタンにドロップダウンメニューを生成できるようにすると、さらに便利になると思います。いろいろな言語をまとめて設定できると嬉しいです :slight_smile: