1
votes

I am using the react native pell rich editor for my react native app.But unable to set the font size. anybody please help me to set the font size for the text

1

1 Answers

0
votes

I am able to give multiple font styles, but not Font-family, you may take reference from below my code.

<RichEditor
        ref={richText}
        initialFocus={false}
        initialHeight={40}
        editorStyle={{
          color: ColorConstant.MAIN_DARK,
          contentCSSText: 'font-size: 42px;font-family: Poppins, sans-serif;',
          
        }}
        onBlur={handleBlur}
        placeholder="add description*"
        //editorInitializedCallback={() => this.onEditorInitialized()}
        // onChange={descriptionText => {
        //   console.log('descriptionText:', descriptionText);
        // }}
        onChange={text => {
          setEventDescription(text);
        }}
      />