基本的なコード RichTextを使う場合のベーシックなコードは次のようになります。h2タグで囲まれた見出しが出力されます。Block Editor Handbookの例をアレンジました。 const { registerBlockType } = wp.blocks; const { RichText } = wp.blockEditor; registerBlockType( /* ... */, { // ... attributes: { title: { type: 'string', // データ型 source: 'html', //どのようにデータを取り出すか selector: 'h2', //対象要素 } } edit(props){ const { attributes: { title, }, } = props; <RichText tagName="h2" //