I need the ability to set the label on an rich text editable element when using the multi root editor.
I think I have a setup that is slightly more complicated than normal uses cases that I will describe here.
At the point the multi root editor is configured, I do not have information about which rich text editors will be on the page.
So the editor root is setup and the editor and editableElements (empty at this point) are loaded into a react context
Later I use the editor from the context to call addRoot to setup each rich text element.
editor.addRoot(id, {
data: getIn(getFieldMeta.current().value, id),
isUndoable: false,
config:{ label:'My Label'} //something like this
});
At the point addRoot is called, I have all the information about the rich text editor, including the label. I would like to be able to pass in additional config at this point to set the label.
The editableElements updates which updates the context, and finally this is rendered inside my application along with the toolbarElement.
Without this, the rich text element is labelled in an unhelpful way:
I need the ability to set the label on an rich text editable element when using the multi root editor.
I think I have a setup that is slightly more complicated than normal uses cases that I will describe here.
At the point the multi root editor is configured, I do not have information about which rich text editors will be on the page. So the editor root is setup and the
editor
andeditableElements
(empty at this point) are loaded into a react contextLater I use the
editor
from the context to calladdRoot
to setup each rich text element.At the point
addRoot
is called, I have all the information about the rich text editor, including the label. I would like to be able to pass in additional config at this point to set the label.The
editableElements
updates which updates the context, and finally this is rendered inside my application along with thetoolbarElement
.Without this, the rich text element is labelled in an unhelpful way: