Open iwifigame opened 7 years ago
I confirm it's a bug in MacOS, not in Windows 7.
If I use Chinese input method to type some character, only the typed letters are showed in the editor, the Chinese char I inputed is NOT entered the editor and never showed. You could see the captured image as below. You could find that only the letter 'p' is showed, not the Chinese,
As s quick fix, user could paste the Chinese to this editor from the system clipboard.
用户可以通过系统剪贴版将中粘贴进这个编辑器。
I believe it is the same bug as issue #22 . Please merge them.
@vincent7f I fix this issue, you can load the code from: https://github.com/yuchuangu85/markdown-writer-fx
@yuchuangu85 how did you fix it? The only differences I can see in your two commits is running on Java 11 and using newer RichTextFX version...
@DevCharly I've been using the JDK 11 development environment, and I've been getting errors since I downloaded it, so I've changed the dependencies and the program is working fine.
I added a Main. java class to run in JDK 11
@yuchuangu85 and using Java 11 (instead of 8) fixes #14 and #22?
@DevCharly Yes, it' ok now.
This is not markdown-writer-fx problem,it is javafx webview problem
I use jdk17.0.2, below simplest code does not work too.
public void start(Stage primaryStage) { WebView webView = new WebView(); try { webView.getEngine().loadContent("<p><strong>中文</strong></p>"); VBox vBox = new VBox(webView); Scene scene = new Scene(vBox, 960, 600); primaryStage.setScene(scene); primaryStage.show(); } catch (Exception e) { e.printStackTrace(); } }
And it is easy to fix, just add a chinese font.
open markdownpad-github.css,
change font-family: Helvetica, arial, freesans, clean, sans-serif; to
font-family: Microsoft YaHei UI,Helvetica, arial, freesans, clean, sans-serif;
then it work.
@iwifigame thanks for reporting.
Yes, bold and italic do not work for Chinese characters in editor and preview.
Have no idea how to fix this. Maybe a JavaFX problem? Any ideas?