Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insertOrderedList doesn't work as expected #390

Open
MostafaHamdy3 opened this issue Feb 20, 2025 · 0 comments
Open

insertOrderedList doesn't work as expected #390

MostafaHamdy3 opened this issue Feb 20, 2025 · 0 comments

Comments

@MostafaHamdy3
Copy link

MostafaHamdy3 commented Feb 20, 2025

When I use the insertOrderedList formatting action, In the second list after I press space it cancels the numbering sequence and starts from the beginning

video1452126500.mp4

This is my code

            <ScrollView style={styles.richScroll}>
              <RichEditor
                ref={richText}
                onChange={onChangeTextHandler}
                style={styles.rich}
                useContainer={true}
                onCursorPosition={handleScrolling}
                placeholder={i18n.t(`write_${postType}Here`)}
                editorStyle={{
                 // some styles
                }}
                onFocus={onFocusHandler}
                // onBlur={onBlurHandler}
              />
            </ScrollView>
          <RichToolbar
            editor={richRef}
            actions={[
              actions.insertBulletsList,
              actions.insertOrderedList,
              actions.setBold,
              actions.heading2,
            ]}
            iconTint={uiColors.textColor19}
            selectedIconTint={uiColors.textColor3}
            iconMap={{
              [actions.heading2]: ({ tintColor }) =>
                renderFormatType(FormatHeader, I18n.t("header"), tintColor),
              [actions.setBold]: ({ tintColor }) =>
                renderFormatType(FormatBold, I18n.t("bold"), tintColor),
              [actions.insertBulletsList]: ({ tintColor }) =>
                renderFormatType(FormatListBulleted, I18n.t("bulleted"), tintColor),
              [actions.insertOrderedList]: ({ tintColor }) =>
                renderFormatType(FormatListNumbered, I18n.t("numbered"), tintColor),
            }}
            flatContainerStyle={styles.flatStyle}
          />

I use "react-native-pell-rich-editor": "^1.9.0", and "react-native": "0.75.4",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant