我在编辑器中创建了一个自定义格式
array(
'title' => 'Tab',
'block' => 'div',
'classes' => 'tab',
'wrapper' => true,
'exact' => true,
),
Run Code Online (Sandbox Code Playgroud)
然后,我可以通过选择一些文本并选择我的格式来使用它:
<div class="tab">
<h3>My Content heading 1</h3>
<p>My first bit of content here...</p>
</div>
Run Code Online (Sandbox Code Playgroud)
到现在为止还挺好.但是,当我选择以下文本并选择我的格式时,它会扩展现有的div而不是插入新的div,所以我最终得到:
<div class="tab">
<h3>My Content heading 1</h3>
<p>My first bit of content here...</p>
<h3>My Content heading 2</h3>
<p>My second bit of content here...</p>
</div>
Run Code Online (Sandbox Code Playgroud)
当我想要的是这个:
<div class="tab">
<h3>My Content heading 1</h3>
<p>My first bit of content here...</p>
</div>
<div class="tab">
<h3>My Content heading 2</h3>
<p>My second bit of …Run Code Online (Sandbox Code Playgroud)