如何在 pagedown js 中使用 ~~satya~~ (strike)?
How to use ~~satya~~ (strike) in pagedown js?
我正在使用如下代码
$('#convert').click(function(){
var message = $('#textarea').val();
var converter = new Markdown.Converter();
var output = converter.makeHtml(message);
console.log(output);
$('#show').html(output);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Converter.js"></script>
<textarea rows="10" cols="20" id="textarea"></textarea><br>
<input type="button" name="" value="submit" id="convert">
<div id="show"></div>
但是 ~~satya~~ 没有工作
如何通过工作进行罢工。
Markdown 的语法不支持删除线。一些实现添加了作为非标准插件的支持,但这些(少数)实现的语法有所不同。在不查看他们的文档的情况下,我不知道 pagedown 是否提供此类支持,但我认为不会。事实上,这将是我对任何 Markdown 实施的假设。
也就是说,rules 状态:
Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. ...
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
因此,下面的 Markdown:
<del>satya</del>
将生成以下渲染文档:
satya
我正在使用如下代码
$('#convert').click(function(){
var message = $('#textarea').val();
var converter = new Markdown.Converter();
var output = converter.makeHtml(message);
console.log(output);
$('#show').html(output);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pagedown/1.0/Markdown.Converter.js"></script>
<textarea rows="10" cols="20" id="textarea"></textarea><br>
<input type="button" name="" value="submit" id="convert">
<div id="show"></div>
Markdown 的语法不支持删除线。一些实现添加了作为非标准插件的支持,但这些(少数)实现的语法有所不同。在不查看他们的文档的情况下,我不知道 pagedown 是否提供此类支持,但我认为不会。事实上,这将是我对任何 Markdown 实施的假设。
也就是说,rules 状态:
Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. ...
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
因此,下面的 Markdown:
<del>satya</del>
将生成以下渲染文档:
satya