-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Description
Hi,
I am trying to allow my users to change the font.
<Button
title="Change Font"
onPress={() => {
setChangeFont((prevValue) => !prevValue);
}}
/>
<RichEditor
ref={richTextRef}
editorStyle={changeFont ? initialCSSText : undefined}
style={{
minHeight: 200,
backgroundColor: '#f0f0f0',
borderWidth: 2,
borderColor: 'red',
}}
editorInitializedCallback={() =>
console.log('Editor initialized')
}
onChange={(text) => setText(text)}
placeholder="Rich Editor Here"
/>But it won't work, clicking the button and changing the state won't affect the rich editor.
Is there any other way to allow font change?
There's an action called fontName but I couldn't find a way to use it, and it's not in the docs.
Metadata
Metadata
Assignees
Labels
No labels