Open JMA12 opened 5 years ago
You can get an array of the current inline styles by doing the following.
const inlineStyles = editorState.getCurrentInlineStyle();
As written in the documentation.
Thanks to @jkhaui for the correction.
@jobpaardekooper Just a heads up, you don't pass any arguments to getCurrentInlineStyle()
I'm pretty sure. So just using const inlineStyles = editorState.getCurrentInlineStyle();
on its own is enough to return an OrderedSet which holds the inline styling info
@jkhaui you are correct according to the documentation.
How can I get the inline styles that focused content have?
For instance, the focused text as shown on the image is bold.