Comments (8)
我不是作者,我猜测样式表应该是这个: https://github.com/pandao/editor.md/blob/master/src/scss/github-markdown.scss
如果你实验出了正确答案,也请劳烦在这里更新下,谢谢!
from editor.md.
只需要一个样式文件就可以了,<link rel="stylesheet" href="../dist/css/editormd.preview.css" />
。
JS文件也要引用,示例:
<script src="js/jquery.min.js"></script>
<script src="../lib/marked.min.js"></script>
<script src="../lib/prettify.min.js"></script>
<!-- 如果有使用flowchart和sequence-diagram才引用 -->
<script src="../lib/raphael.min.js"></script>
<script src="../lib/underscore.min.js"></script>
<script src="../lib/sequence-diagram.min.js"></script>
<script src="../lib/flowchart.min.js"></script>
<script src="../lib/jquery.flowchart.min.js"></script>
<script src="../editormd.js"></script>
from editor.md.
不行.... 是不是缺少个初始化函数之类的东西?
from editor.md.
把代码贴出来,不然不清楚是什么问题。
from editor.md.
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<title>
完整示例 - Editor.md examples
</title>
<link rel="stylesheet" href="../editor.md/dist/css/editormd.preview.css" />
<script type="text/javascript" src="../editor.md/examples/js/jquery.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/marked.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/prettify.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/raphael.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/underscore.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/sequence-diagram.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/flowchart.min.js" ></script>
<script type="text/javascript" src="../editor.md/lib/jquery.flowchart.min.js" ></script>
<script type="text/javascript" src="../editor.md/dist/js/editormd.js" ></script>
</head>
<body>
<table>
<thead>
<tr>
<th>
adasa
</th>
<th>
adsa
</th>
<th>
ad
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
ad
</td>
<td>
ada
</td>
<td>
asda
</td>
</tr>
<tr>
<td>
adsd
</td>
<td>
asda
</td>
<td>
ads
</td>
</tr>
</tbody>
</table>
</div>
</form>
</body>
</html>
adasa adsa ad
ad ada asda
adsd asda ads
from editor.md.
如果你用的是最新版本的话,相关路径要更新下。 因为dist
目录已经不存在了。
你看看浏览器控制台有没有提示你404错误。
from editor.md.
@noah1996 你的使用方法不对,请参考这个示例 https://pandao.github.io/editor.md/examples/html-preview-markdown-to-html.html
var testEditormdView = editormd.markdownToHTML("test-editormd-view", {
markdown : "markdown",
//htmlDecode : true, // 开启HTML标签解析,为了安全性,默认不开启
htmlDecode : "style,script,iframe", // you can filter tags decode
emoji : true,
taskList : true,
tex : true,
flowChart: true,
sequenceDiagram : true,
});
from editor.md.
非常感谢两位的耐心解答 @pandao @tylerlong
有了pandao大哥的示例就没问题了,
谢谢
from editor.md.
Related Issues (20)
- 如何改变字体的颜色
- 评价
- 123
- Error in both the Chinese and English homepages regarding Superscript and Subscript
- unwatch的时候Preview不会显示最新的内容 HOT 1
- 一个文本框不显示的bug HOT 4
- 根据demo起了一页,但上传图片失败, 所有js和css都已引入 HOT 1
- 请问,editor支持原生微信小程序吗?
- Anyone Know why smiley Not Rendering? 有人知道为什么笑脸不渲染吗?
- Make left side monospace
- There is an XSS on the editor.md.
- Chrome extension to replace GitHub Markdown editor?
- I want add new block quoate syntax to editor md
- 引入之后一直转圈 HOT 1
- Return value of Typecho\I18n\GetText::translate() must be of the type string, null returned
- Invalidity of TeX in tables(forms)
- 默认全窗口预览的问题 HOT 2
- :heart: icon not rendering in Editor
- flow 流程图 在 markdownToHTML 操作时失效问题
- 大佬能否考虑下加入语法高亮
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from editor.md.