0
{{ apos.singleton(data.page, 'textBlock', 'apostrophe-rich-text', {
    toolbar: [ 'Styles', 'Bold', 'Italic' ],
    styles: [
      { name: 'Title', element: 'h3' },
      { name: 'Meta', element: 'h5' }
    ]
  }) }}

是否可以将添加富文本更改为其他名称

4

2 回答 2

1

在您的根目录中app.js,使用以下内容更新文件:

var apos = require('apostrophe')({
    ...

    // The modules you want to use.
    modules: {
        ...
        'apostrophe-rich-text-widgets':{
          label: 'Awesome Text'
        },
        ...
   }

})

例如,如果您想要“添加真棒文本”按钮,只需使用“真棒文本”的值更新模块label配置选项的属性即可apostrophe-rich-text-widgets获得所需的结果。请注意, 的值label不应像“Add ..”那样开头,而是撇号将在给定值的前面加上单词“Add”。

于 2017-02-04T12:42:05.867 回答
0

这东西有效,但唯一的问题是每个文本都会更改,我想指定每个文本

例如:添加标题、添加段落、……</p>

于 2017-02-06T18:06:23.647 回答