Markdown所见即所得的编辑器和同一文本区域中的预览 [英] Markdown wysiwyg Editor and Preview in same Textarea

查看:48
本文介绍了Markdown所见即所得的编辑器和同一文本区域中的预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索一个编辑器以在相同的文本区域中编写Markdown语法并进行预览,例如 很棒,但我认为它不适用于 textarea 元素.同样,我可以使用一种较小的解决方案,不要为了一小部分按钮和功能而过大.textarea对我来说也很重要,为什么用户会使用php中的send post进行保存,也没有使用Javascript.目标是提供简单的注释,编写减价记录,或者使用按钮进行格式化,并仅查看格式化的内容以便于阅读.

提示:我已阅读问题#1 解决方案

我找到了解决方案 showdown to-markdown ,例如结果和他的来源.提示是,我添加了一个css语句 style ="display:none;" ,该文本区隐藏了带有源代码的文本区域,而不是更多.源文件中的行

-> https://github.com/bueltge/Notes

I search for a editor to write Markdown syntax and preview in the same textarea, like Bootstrap WYSIHTML5 for html.

I don't like a additional preview. The preview in additional element have many scripts, there I can find on the web. But for me is important, that the edit element is also the view element, write and see with markdown. Maybe hallo.js is great, but I think it works not with textarea element. Also it is fine, that I can use a small solution, not to oversize for a small list of buttons and functions. The textarea is also important for me, why the user will save with send post in php, also without Javascript. The goal is a simple notes, write markdown, alternative use the buttons to format and see only the formatted content to easy readable.

Hint: I have read question #1 and question #2, but only CK Editor and Aloha is the solution. Two nice projects, but very big for my small requirements.

Thanks a lot for your time.

解决方案

I have found a solution with the showdown and to-markdown, the the result and his source for example. The hint is, that I add a css statement style="display: none;", that hide the textarea with the source, not more. Line in the source file

--> https://github.com/bueltge/Notes

这篇关于Markdown所见即所得的编辑器和同一文本区域中的预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆