将 wmd-editor 与 php 一起使用
我正在使用 WMD 编辑器(github 上的修改版)。 我使用 PHP 作为后端。当我发送编辑器的内容并尝试回显它们时,它们没有按预期显示。 我使用 $_POST 接收数据,然后将其放入 mysql 数据库中。
例如,当我尝试创建一个列表时:
- Dummy
- Text
- This is
It 将其显示为 -Dummy -Text -This is。 我怎样才能让它输出列表?
I'm using WMD-Editor (the modifed one at github).
I'm using PHP as the backend. When I send the contents of Editor and try to echo them, they don't come out as expected.
I'm using $_POST to receive the data and then placing it into a mysql database.
For example when I try to make a list:
- Dummy
- Text
- This is
It displays it as -Dummy -Text -This is.
How can I make it output the list?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您收到的是 Markdown 语法的文本;要将其转换为 HTML,您需要 PhpMarkdown。只需下载该库,将其包含在您的脚本中,然后通过
Markdown()
函数传递文本(如“在您自己的程序中”部分中所述)。What you are receiving is text with Markdown syntax; to convert it into HTML you need PhpMarkdown. Just download the library, include it in your script and pass the text thru the
Markdown()
function (as explained in the 'In your own programs' section).