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

[ios] when input 1st alphabet in chinese keyboard, it will be shown twice #154

Closed
yichengq opened this issue Feb 23, 2021 · 6 comments
Closed

Comments

@yichengq
Copy link

yichengq commented Feb 23, 2021

Thanks for this nice rich editor!

The alphabet will show as plain english first, then the alphabet in input method editor.

1614063776281291.mp4

any thought?

code:

        <RichEditor
          ref={richText}
          placeholder="分享你的经历和想法,
          详细的个人经历描述能够更好的帮助到提问者"
          initialContentHTML={post}
          initialFocus={true}
          style={styles.editor}
          // eslint-disable-next-line react-native/no-inline-styles
          editorStyle={{
            backgroundColor: gstyles.COLOR_LIGHT_PURPLE,
            color: gstyles.COLOR_GRIMMY_GREY,
            placeholderColor: gstyles.COLOR_LIGHT_BLUE,
            contentCSSText: 'font-size: 16px',
          }}
          onHeightChange={() => {
            setTimeout(() => scrollView?.current?.scrollToEnd());
          }}
        />
@Jeyoung-Park
Copy link

try this.
path: ./node_modules/react-native-pell-rich-editor/src/editor.js
remove this line.
formatParagraph(true);

@faisalansari97
Copy link

Adding defaultParagraphSeparator={""} as prop solved my issue.

@stulip
Copy link
Member

stulip commented May 28, 2021

@yichengq 之前一直没有测试过中文,所以没发现这个问题, 此问题目前测试是出现在空内容的情况下。我尽量修复一下。

@stulip
Copy link
Member

stulip commented May 28, 2021

1.8.3 Solved this problem

@stulip stulip closed this as completed May 28, 2021
@yichengq
Copy link
Author

@stulip Thanks for the potential fix!

Still see the similar issue on iOS:

Image.from.iOS.MP4

pacakge-lock.json:

    "react-native-pell-rich-editor": {
      "version": "1.8.5",
      "resolved": "https://registry.npmjs.org/react-native-pell-rich-editor/-/react-native-pell-rich-editor-1.8.5.tgz",
      "integrity": "sha512-8sks6ah/ffafC0m5PVJ4ZHPg8hT3EwTNkL6qaKELOPKWbnrR9tu72yLZiFqO5n3u8lkHhY79FQ4g7wdXt6F7iw=="
    },

code:

          <RichEditor
            ref={richText}
            placeholder="分享你的经历和想法,
            详细的**个人经历描述**能够更好的帮助到提问者"
            initialContentHTML={post}
            initialHeight={200}
            style={styles.editor}
            // eslint-disable-next-line react-native/no-inline-styles
            editorStyle={{
              backgroundColor: gstyles.COLOR_LIGHT_PURPLE,
              color: gstyles.COLOR_GRIMMY_GREY,
              placeholderColor: gstyles.COLOR_LIGHT_BLUE,
              contentCSSText: 'font-size: 16px',
            }}
            onChange={setPost}
          />

Do I miss anything?

感谢大佬!

@fengmingye
Copy link

try this.
path: ./node_modules/react-native-pell-rich-editor/src/editor.js
remove this line.
formatParagraph(true);

This solved my issue, thanks!

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

5 participants