Comments (1)
你用这个试试,我这里不会报错
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
<meta name="theme-color" content="#f1f7fe">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View
modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。</title>
<meta name="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta property="og:description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<meta name="twitter:description" property="og:description" itemprop="description"
content="Vditor 支持三种所见即所得(wysiwyg)、即时渲染(ir)、分屏预览(sv)模式,支持大纲、数学公式、脑图、图表、流程图、甘特图、时序图、五线谱、多媒体、语音阅读、标题锚点、代码高亮及复制、graphviz 渲染。"/>
<link rel="dns-prefetch" href="//unpkg.com/"/>
<link rel="preconnect" href="https://unpkg.com">
<link rel="icon" type="image/png" href="https://unpkg.com/vditor/dist/images/logo.png"/>
<link rel="apple-touch-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<link rel="shortcut icon" type="image/x-icon" href="https://unpkg.com/vditor/dist/images/logo.png">
<meta name="copyright" content="B3log"/>
<meta http-equiv="Window-target" content="_top"/>
<meta property="og:locale" content="zh-cmn-Hans"/>
<meta property="og:title"
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta property="og:site_name" content="Blog-vditor"/>
<meta property="og:url" content="https://b3log.org/vditor"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:domain" content="b3log.org"/>
<meta name="twitter:title" property="og:title" itemprop="b3lig vditor"
content="Vditor: ♏ An In-browser Markdown editor, support WYSIWYG, Instant Rendering (Typora-like) and Split View modes. 一款浏览器端的 Markdown 编辑器,支持所见即所得、即时渲染(类似 Typora)和分屏预览模式。"/>
<meta name="twitter:site" content="@B3logOS"/>
<meta name="twitter:url" content="https://b3log.org/vditor"/>
<meta property="og:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<meta name="twitter:image" content="https://unpkg.com/vditor/dist/images/logo.png"/>
<style>
body {
margin: 0;
padding: 0 20px;
}
.nav {
text-align: center;
margin: 20px 0
}
a {
color: #4285f4;
}
</style>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/index.css">
<script src="https://unpkg.com/[email protected]/dist/index.min.js"></script>
</head>
<body>
<div class="vditor-reset nav">
<a href="https://b3log.org/vditor" target="_blank">官网</a>
</div>
<div id="vditor">
<h1>Vditor</h1>
<ul>
<li>foo</li>
<li>bar</li>
</ul>
</div>
<script>
const vditor = new Vditor('vditor', {
after() {
vditor.setValue('Hello, Vditor!')
},
})
</script>
</body>
</html>
from vditor.
Related Issues (20)
- 文档 标题内容带有下划线(_)时,在preview模式下,生成目录时把标题内容中的下划线(_)删除了
- 调用enable,disabled方法内部报错 HOT 1
- Expose setEditMode method HOT 2
- 提供readOnly模式 HOT 5
- Latex无法解析以数字开头的公式 HOT 1
- 通过调用setValue方法给md设置内容,点击sql的复制按钮后会出现两个编辑框 HOT 3
- 导出 PDF 时主题错误 HOT 3
- 改进表格中行内数学公式 `|` 的渲染
- 可编辑区域高度内部拓展 HOT 1
- Plain text copied using hotkey contains ZWSP HOT 1
- 添加 options.preview.hljs.renderMenu 方法
- 数学表达式matrix自从3.8.6版本开始,无法正常渲染 HOT 2
- 是否有方式可以禁止 iframe 或是其它任何 html 标签 HOT 5
- 希望在编辑器渲染完成后包括大纲等配置项可以变更配置,大纲渲染完成后更新开关状态已强行解决 HOT 1
- Plugins? HOT 1
- 想自建cdn用github最新源码打包报错,直接打包报以下错误 HOT 1
- 自定义渲染器输出的HTML与内置渲染器不同 HOT 1
- WYSIWYG 模式下链接包含粗体无法打开
- 集成应用的离线需求 HOT 4
- i18n/zh_CN.js未请求到报错404但是,浏览器显示已经请求成功了 HOT 3
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 vditor.