wmd - markdown 编辑器 - 如何将其分配给任意文本字段?
如果你们中有人曾经使用过 wmd markdown 编辑器(类似于 stackoverflow 使用的编辑器),那么也许你可以帮助我:
WMD 默认情况下将自己分配给页面上找到的第一个文本区域。 然而,我有一个页面,其中有任意数量的文本区域出现在我需要分配 WMD 的页面之前。 WMD 提供了创建和销毁自身实例的选项,但我没有成功创建实例并将其分配给特定的文本区域(即通过“id”或“class”)。 有人能够做到这一点吗? (wmd 的 javascript 代码是模糊的,因此通过查看源代码来弄清楚这一点将是一个巨大的痛苦)。
If any of you have ever used wmd markdown editor (which is like the editor that stackoverflow uses) then maybe you are able to help me out:
WMD by default assigns itself to the first textarea found on the page. However, I have a page with an arbitrary amount of textareas appearing before the one I need WMD assigned to. WMD provides options to create and destroy instances of itself but I have had no luck creating an instance and assigning it to a specific textarea (i.e. by 'id' or 'class'). Has anyone been able to do this? (the javascript code for wmd is obfuscated so looking through the source to figure this out would be a huge pain).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不记得是谁真正做到了,但在 SO 的早期 - Jeff 遇到了与您遇到的类似问题(当然不完全相同),但对非混淆源的渴望导致有人对可读形式进行了逆向工程。 杰夫幸运的是,他通过播客做了广告,工作就完成了。 我不记得他们把它放在哪里了,但我认为它是 codeplex。 抱歉,我不记得确切的细节了。
Google^h^h^hBing 是你的朋友。
I cant recall who actually did it, but in the early days of SO - Jeff encountered similar problems to what your experiencing (well not exactly the same) but the desire for the non obfuscated source resulted in someone(s) reverse engineering a readable form. Lucky for Jeff he advertised it via the podcast and the work got done. I dont recall exactly where they put it but i think it was codeplex. Sorry i dont recall the exact details.
Google^h^h^hBing is your friend.
默认情况下,wmd 将抓取第一个文本区域。 如果您希望 WMD 忽略文本区域,您可以将“wmd-ignore”类添加到标签中。
例如:
来自 WMD 自述文件:
By default, wmd will grab the first textarea. If you want WMD to ignore a textarea, you can add the class 'wmd-ignore' to the tag.
for example:
from the WMD readme file: