{{ apos.singleton(data.page, 'textBlock', 'apostrophe-rich-text', {
toolbar: [ 'Styles', 'Bold', 'Italic' ],
styles: [
{ name: 'Title', element: 'h3' },
{ name: 'Meta', element: 'h5' }
]
}) }}
是否可以将添加富文本更改为其他名称
{{ apos.singleton(data.page, 'textBlock', 'apostrophe-rich-text', {
toolbar: [ 'Styles', 'Bold', 'Italic' ],
styles: [
{ name: 'Title', element: 'h3' },
{ name: 'Meta', element: 'h5' }
]
}) }}
是否可以将添加富文本更改为其他名称
在您的根目录中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”。
这东西有效,但唯一的问题是每个文本都会更改,我想指定每个文本
例如:添加标题、添加段落、……</p>