前提・実現したいこと
テキストエディタで改行がそのまま残るようにする。
発生している問題・エラーメッセージ
ワードプレスにて自動成形を停止、Pタグの自動挿入は残すコードを適応した結果テキスト画面の改行が出来るが、 テキスト画面(改行する)→ビジュアル画面→テキスト画面にすると、改行が全部詰められてしまう。
該当のソースコード
add_action('init', function() { remove_filter('the_title', 'wptexturize'); remove_filter('the_content', 'wptexturize'); remove_filter('the_excerpt', 'wptexturize'); remove_filter('the_title', 'wpautop'); remove_filter('the_content', 'wpautop'); remove_filter('the_excerpt', 'wpautop'); remove_filter('the_editor_content', 'format_for_editor'); }); add_filter('tiny_mce_before_init', function($init) { $init['wpautop'] = false; $init['apply_source_formatting'] = ture; return $init; });
補足情報(FW/ツールのバージョンなど)
あなたの回答
tips
プレビュー