react-native-rich-editor
react-native-rich-editor copied to clipboard
Ordered List is not working properly in all android devices
For example in realme and samsung devices its showing as
1 Apple 1 Orange 1 Mango
Expected
- Apple
- orange
- mango
Alwasys 1 is coming the subsequent numbers like 2 , 3, .... are not coming.
I'm also getting the same issue.
Seems like the editor creates a separate set of <ul>---</ul>
while tapping either return-key or selecting any suggestion on keyboard
Seems like related to #120
@swalahamani You can fix this buy disabling the autocorrect or text prediction option from the mobile keyboard.
@ThejazR Without disabling those options, Can I fix this error?
I am also experiencing this on multiple Android devices. When I add a new number it works correctly until I try to focus the next list item in order to add text.
becomes
-
text here
This issue also occurs for bullet lists.
@swalahamani You can fix this by disabling the autocorrect or text prediction option from the mobile keyboard.
Yeah, that is correct. But it seems like the only way to do that is via the settings app and couldn't find any programmatical way.
in editor.js
function formatParagraph(async) if (async == true) return;
Can solved
I don't know if there will be any other problems
@shijinwu Can you provideinitialContentHTML
for me to test
@stulip This does not need initial content. Here are the steps to reproduce though:
- With the editor empty, type "Hello".
- Press Enter 2 times.
- Tap on the number list icon.
- Type "One" and then press enter.
- Type "Two".
Expected Output
Hello
- One
- Two
Actual Output:
Hello
1.One
1.Two
RichEditor supports html props, which was forgotten to be mentioned in the documentation. I moved the createHtml function to my project and modified it to solve this problem. #245
So whats the fix?
@sujathasperi2022
addEventListener(content, 'compositionstart', function(event){
compositionStatus = 1;
})
addEventListener(content, 'compositionend', function (event){
compositionStatus = 0;
paragraphStatus && formatParagraph(true);
})
I commented out these lines in the html file these lines are only needed if you want to use hieroglyphs in your application.
I added my idea to the pull request. You can watch this #314 .