Function: DiffSourceToggleWrapper()

DiffSourceToggleWrapper(props, context?): ReactNode

A wrapper element for the toolbar contents that lets the user toggle between rich text, diff and source mode. Put the rich text toolbar contents as children of this component. For this component to work, you must include the diffSourcePlugin.

Parameters

ParameterType
propsobject
props.childrenReactNode
props.options?ViewMode[]
context?any

Returns

ReactNode

Example

 <MDXEditor markdown='Hello world'
   plugins={[toolbarPlugin({
     toolbarContents: () => ( <> <DiffSourceToggleWrapper><UndoRedo /><BoldItalicUnderlineToggles /></DiffSourceToggleWrapper></>)
   }), diffSourcePlugin()]}
 />