memspace / zefyr

Soft and gentle rich text editing for Flutter applications.
https://zefyr-editor.gitbook.io
2.22k stars 551 forks source link

<a grave error>It works well in a simulator, but it doesn't work in real iPhone devices. #459

Open intelryzen opened 3 years ago

intelryzen commented 3 years ago

Steps to Reproduce

Thank you always for your hard work.

Currently, this version cannot be changed to bold text when entering Chinese or Korean. As soon as I write a letter, the thickness of the letter goes back to its original state.

It works well in a simulator, but it doesn't work in real iPhone devices.

This seems to be an overall problem, not just a version of this plug-in.

Logs

8075qy commented 3 years ago

Have you solved the problem now?

intelryzen commented 3 years ago

Have you solved the problem now? No, I tested it with the actual device, but the problem still remains.

8075qy commented 3 years ago

After observation, I come to the conclusion that the original Pinyin will be replaced after Chinese editing, resulting in the final result that Chinese is not bold or slanted. Maybe we can change the source code to solve this problem.

singerdmx commented 3 years ago

@8075qy do you have a pull request to address this?

8075qy commented 3 years ago

@ 8075qy您是否有请求请求来解决此问题?

I'm modifying the source code

singerdmx commented 3 years ago

Could you share your solution, please?

8075qy commented 3 years ago

Could you share your solution, please?

Please leave your email and I will send the source code to your email after modification

singerdmx commented 3 years ago

My email is singerdmx@gmail.com Please also leave instruction about the diff. If you have git history, that will do.

8075qy commented 3 years ago

My email is singerdmx@gmail.com Please also leave instruction about the diff. If you have git history, that will do.

What language do you have this problem in

singerdmx commented 3 years ago

I haven't tried what you tested with, but I do want to address this issue for my repo https://github.com/singerdmx/flutter-quill

singerdmx commented 3 years ago

@8075qy I am trying to build a text editor for mobile only and fully support delta - exact the same delta as used by ReactQuill https://github.com/zenoamaro/react-quill We already have used it in the Bullet Journal App: https://bulletjournal.us/home/index.html We want to improve the user experience for Chinese input. But we haven't tested using Chinese

8075qy commented 3 years ago

@ 8075qy 我正在尝试构建仅用于移动设备并完全支持增量的文本编辑器-与ReactQuill使用的完全相同的增量https://github.com/zenoamaro/react-quill 我们已经在Bullet Journal App中使用了它:https://bulletjournal.us/home/index.html 我们希望改善中文输入的用户体验。 但是我们还没有使用中文进行测试

Thanks, but I still want to use rich text in zerfy

singerdmx commented 3 years ago

Sounds good. Please share your solution once you have it. Thanks!

intelryzen commented 3 years ago

thanks, korean and chinese is not well in this plugin

8075qy commented 3 years ago

谢谢,韩文和中文在此插件中效果不佳

What is your final choice

8075qy commented 3 years ago

谢谢,韩文和中文在此插件中效果不佳

What is your final choice

Android doesn't seem to have this problem

intelryzen commented 3 years ago

I just tested Korean with an Android device, but the font thickness didn't apply. Can you test it in Korean?

8075qy commented 3 years ago

I just tested Korean with an Android device, but the font thickness didn't apply. Can you test it in Korean?

Android device I tested in Chinese and Korean, the results are normal

intelryzen commented 3 years ago

Oh? That's weird. Did you test it with the actual device? When I just tested it, it didn't work out. I'll double-check.

8075qy commented 3 years ago

Oh? That's weird. Did you test it with the actual device? When I just tested it, it didn't work out. I'll double-check.

Yes, I use the physical machine for testing

intelryzen commented 3 years ago

Could I know the zefyr version that you used?

8075qy commented 3 years ago

Could I know the zefyr version that you used?

0.12.0

8075qy commented 3 years ago

There is a inser_rules.dart modification rule in the zefyr dependency package notus, because the output of the keyboard is different due to the different languages of each country. Just modify it according to the language of your own country

intelryzen commented 3 years ago

Unlike English, Korean can have up to three keyboard characters in one box. I knew that the thick letters would disappear as soon as there were several characters in one box. I saw insert_rule.dart, but I don't know which code to modify

8075qy commented 3 years ago

Unlike English, Korean can have up to three keyboard characters in one box. I knew that the thick letters would disappear as soon as there were several characters in one box. I saw insert_rule.dart, but I don't know which code to modify

In fact, the most important problem is the loss of style state in controller.dart. You can go into debugging mode and look at the toggledStyles function. When the word has not been generated, the style can be obtained. After the word is determined, the style cannot be obtained

8075qy commented 3 years ago

_toggledStyles = NotusStyle(); After reset, there is no style after confirming the word

8075qy commented 3 years ago

IMG_0533 Iphone test results.

intelryzen commented 3 years ago

Wow, that's amazing. Could you send me the modified source code by email below? intelryzen@naver.com