http://qiita.com/jyokyoku/items/c560b0d1eacc1df61620
上記のページを参考にして
php
1/*自動整形解除*/ 2 3 remove_filter('the_excerpt', 'wpautop'); 4 remove_filter('the_content', 'wpautop'); 5remove_filter( 'the_content', 'wptexturize' ); 6 7 8function override_mce_options( $init_array ) { 9 global $allowedposttags; 10 11 $init_array['valid_elements'] = '*[*]'; 12 $init_array['extended_valid_elements'] = '*[*]'; 13 $init_array['valid_children'] = '+a[' . implode( '|', array_keys( $allowedposttags ) ) . ']'; 14 $init_array['indent'] = true; 15 $init_array['wpautop'] = false; 16 $init_array['force_p_newlines'] = false; 17 18 return $init_array; 19} 20 21add_filter( 'tiny_mce_before_init', 'override_mce_options' ); 22
をfunction.phpに記述して自動整形を止めるようにしているのですが、
ビジュアルエディターにて改行をすると<p>タグが入ったり、
文字を削除すると謎のスペースが入ったりします。
どのようにしたらよろしいでしょうか。
ご教授お願いいたします。
あなたの回答
tips
プレビュー