score:0

https://draftjs.org/docs/api-reference-modifier/#applyinlinestyle is excatly the function you need.

applyinlinestyle(
  contentstate: contentstate,
  selectionstate: selectionstate,
  inlinestyle: string
): contentstate

Related Query

More Query from same tag