CKEditor v4:标题后缩进

时间:2015-04-15 13:42:43

标签: html css ckeditor

是否可以在标题标签(h1-h6)后缩进? 我尝试使用CSS和CKEditor数据处理器。

我需要以下工作流程: 用户:

  1. 写一个标题并将其设置为h1
  2. 在h1标题后输入一些文字
  3. 输出:

    <h1>Heading h1</h1>
    <p style="margin-left: 40px;">Content</p>
    

    尝试CSS:

    p {
         text-indent: 40px;
         /* or -> margin-left: 40px; */
    }
    

    然后它为所有p-tag设置

    CKEditor可以实现这一点,还是应该用CSS解决这个问题?

1 个答案:

答案 0 :(得分:0)

contents.css

中试试这个
h1 + p {
    text-indent: 40px;
}

请参阅:What does the "+" (plus sign) CSS selector mean?

相关问题