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

**中国** Chinese didn't work as ecpected #14

Open
iwifigame opened this issue Dec 5, 2016 · 11 comments
Open

**中国** Chinese didn't work as ecpected #14

iwifigame opened this issue Dec 5, 2016 · 11 comments
Labels

Comments

@iwifigame
Copy link

No description provided.

@JFormDesigner
Copy link
Owner

@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?

@vincent7f
Copy link

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,

Screen Shot 2019-05-10 at 11 13 50

@vincent7f
Copy link

As s quick fix, user could paste the Chinese to this editor from the system clipboard.

用户可以通过系统剪贴版将中粘贴进这个编辑器。

@vincent7f
Copy link

I believe it is the same bug as issue #22 . Please merge them.

@yuchuangu85
Copy link

@vincent7f I fix this issue, you can load the code from: https://github.com/yuchuangu85/markdown-writer-fx

@DevCharly
Copy link
Collaborator

DevCharly commented Dec 25, 2021

@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...

@yuchuangu85
Copy link

@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.

@yuchuangu85
Copy link

I added a Main. java class to run in JDK 11

@DevCharly
Copy link
Collaborator

@yuchuangu85 and using Java 11 (instead of 8) fixes #14 and #22?

@yuchuangu85
Copy link

@DevCharly Yes, it' ok now.

@south55
Copy link

south55 commented Apr 24, 2022

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.
image

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

No branches or pull requests

6 participants