0

PHP を使用して wp_editor() テキストエリアに挿入されたすべての画像にスタイルを適用しようとしています。次のことを試しましたが、成功しませんでした:

<?php
    $settings = array(
        'style_formats' => array(
            array( 
                'block' => 'img', 
                'styles' => array(
                    'width' => '100%'
                )
            )
        )
    );
    
    echo wp_editor('', 'email-content', $settings); 
?>

これを行う正しい構文は何ですか?

次のドキュメントを使用して、このタスクを完了しようとしました。

https://developer.wordpress.org/reference/functions/wp_editor/

https://www.tiny.cloud/docs/configure/content-formatting/

4

2 に答える 2