LoginSignup
1

More than 5 years have passed since last update.

WordPressの管理画面のテキストエディタのフォントサイズ・TABインデント幅を変更する方法

Posted at

Wordpressの管理画面でテキストエディタを利用する場合、TABのインデント数が8文字で見づらいので変更する方法です。

functions.phpに次のコードを追加します。要するにWordPressの管理画面のテキストエディタにCSSを適用します。

functions.php
function add_admin_custom_style() {
    echo '<style type="text/css">
           .wp-editor-area {
              -o-tab-size:2;
              -moz-tab-size:2;
              tab-size: 2 ;

              font-size:12px !important;
           }
         </style>';
}
add_action('admin_head', 'add_admin_custom_style');

今のところうまく動いています。

参考

WordPressテキストエディタのフォントサイズ・TABインデント幅を変更する方法

HTMLインデントはTABとスペースのどちらにするかスタイルガイドを調べてみた

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