【问题标题】:Create and render flexbox columns in tinymce?在 tinymce 中创建和渲染 flexbox 列?
【发布时间】:2021-07-20 16:22:16
【问题描述】:

有没有办法在 tinymce 中创建和渲染列?例如,我想以某种方式插入

<div style={display:flex;}>
<div style={flex:50%;}>
<h2>Hello Earth!</h2>
</div>
<div style={flex:50%;}>
<h2>Hello Mars!</h2>
</div>
</div>

【问题讨论】:

    标签: tinymce


    【解决方案1】:

    您不能使用方括号,但可以使用类创建模板

    例子

    templates: [
        {"title":"2 rows","description":"Insert, 2 rows with the same width","content":"<article class=\"cmsblock\"><div class=\"col span_6\"><h2>Row 1</h2><p>row 1</p></div><div class=\"col span_6\"><h2>Row 2</h2><p>row 2</p></div></article><div class=\"clear\">&nbsp;</div><p></p>"},
        {"title":"3 rows","description":"Insert, 3 rows with the same width","content":"<article class=\"cmsblock\"><div class=\"col span_4\"><h2>Row 1</h2><p>row 1</p></div><div class=\"col span_4\"><h2>Row 2</h2><p>row 2</p></div><div class=\"col span_4\"><h2>Row 3</h2><p>row 3</p></div></article><div class=\"clear\">&nbsp;</div><p></p>"}
    ],
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-02-20
      • 1970-01-01
      • 2020-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多