解决Editor.md中Github emoji图片无法显示的办法

5 篇文章 0 订阅

 

如果你是出现了这种问题,先右键看看控制台是不是这种原因,

 

 如果是上图原因,大概率是路径写错了,虽然网上有分享是怎么解决的,但是我用了都没有解决我的问题,看来这篇文章,顺着他的思路我解决了Editor.md使用注意事项-蒲公英云

首先,先看我的项目结构

 

 

这样改就可以了,运行成功截图如下,鼠标悬停在上面能显示出来图片,就证明你的路径是写对了 

 总结:

下载emoji--复制进入项目--引入css、js--更改路径--问题解决  

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要用Java开发一个Markdown编辑器,可以使用JavaFX图形化界面库来实现。而要集成Editor.md,可以在JavaFX嵌入WebView组件,然后加载Editor.md的HTML页面即可。 以下是实现步骤: 1. 在JavaFX创建一个WebView组件 ``` WebView webView = new WebView(); ``` 2. 通过WebView组件加载Editor.md的HTML页面 ``` String htmlContent = "<html><head><link rel=\"stylesheet\" href=\"https://pandao.github.io/editor.md/css/editormd.min.css\"/></head><body><textarea id=\"editor\"></textarea><script src=\"https://pandao.github.io/editor.md/lib/marked.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/prettify.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/raphael.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/underscore.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/sequence-diagram.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/flowchart.min.js\"></script><script src=\"https://pandao.github.io/editor.md/lib/jquery.min.js\"></script><script src=\"https://pandao.github.io/editor.md/editormd.min.js\"></script><script type=\"text/javascript\">var testEditor = editormd(\"editor\", {});</script></body></html>"; webView.getEngine().loadContent(htmlContent); ``` 3. 将WebView组件添加到JavaFX的场景 ``` Scene scene = new Scene(webView); stage.setScene(scene); stage.show(); ``` 这样就可以实现一个简单的Markdown编辑器,并集成了Editor.md的功能。当然,还需要实现一些逻辑来获取编辑器的内容并进行解析和保存等操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值