React-rte:在工具栏上显示对齐按钮的名称
我有一个反应丰富的文本编辑器。我想显示选项工具栏。 我找到了Align(Jusify)Pharse的显示名称。我试图找到有关此的文档,但是我没有获得任何有用的信息
:例如,历史记录编辑将具有显示名称“ history_buttons”,
const toolbarConfig = {
// Optionally specify the groups to display (displayed in the order listed).
display: ['INLINE_STYLE_BUTTONS',
'BLOCK_TYPE_BUTTONS',
'LINK_BUTTONS',
'BLOCK_TYPE_DROPDOWN',
'HISTORY_BUTTONS'],
INLINE_STYLE_BUTTONS: [
{label: 'Bold', style: 'BOLD', className: 'custom-css-class'},
{label: 'Italic', style: 'ITALIC'},
{label: 'Underline', style: 'UNDERLINE'}
],
BLOCK_TYPE_DROPDOWN: [
{label: 'Normal', style: 'unstyled'},
{label: 'Heading Large', style: 'header-one'},
{label: 'Heading Medium', style: 'header-two'},
{label: 'Heading Small', style: 'header-three'}
],
BLOCK_TYPE_BUTTONS: [
{label: 'UL', style: 'unordered-list-item'},
{label: 'OL', style: 'ordered-list-item'}
]
}
非常感谢!
I have a react rich text editor. I would like to display option toolbar.
I am finding the display name for align (justify) pharse. I tried to find document about that, but I do not get any useful information
For example: history edit will have the display name "HISTORY_BUTTONS"
const toolbarConfig = {
// Optionally specify the groups to display (displayed in the order listed).
display: ['INLINE_STYLE_BUTTONS',
'BLOCK_TYPE_BUTTONS',
'LINK_BUTTONS',
'BLOCK_TYPE_DROPDOWN',
'HISTORY_BUTTONS'],
INLINE_STYLE_BUTTONS: [
{label: 'Bold', style: 'BOLD', className: 'custom-css-class'},
{label: 'Italic', style: 'ITALIC'},
{label: 'Underline', style: 'UNDERLINE'}
],
BLOCK_TYPE_DROPDOWN: [
{label: 'Normal', style: 'unstyled'},
{label: 'Heading Large', style: 'header-one'},
{label: 'Heading Medium', style: 'header-two'},
{label: 'Heading Small', style: 'header-three'}
],
BLOCK_TYPE_BUTTONS: [
{label: 'UL', style: 'unordered-list-item'},
{label: 'OL', style: 'ordered-list-item'}
]
}
I want to find the display name for align pharse.
Thank you so much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同一问题,并在这里找到了我需要的解决方案
”需要做的是将您的工具栏更改为“
for Display”,“保存和导入对齐的数据”访问这个问题
I ran into the same issue and found the solution I needed here
on react-rte github
So what you need to do is change your toolbarConfig into something like
for the display, save and import aligned data visit this issue