0
A
回答
3
要删除与一个按钮添加图像的能力,你可以注释掉两节Markdown.Editor.js
:
为了确保键盘快捷键被禁用,下面的情况下,“G”部分注释掉:
...
case "k":
doClick(buttons.code);
break;
/*
case "g":
doClick(buttons.image);
break;
*/
case "o":
doClick(buttons.olist);
break;
...
为了消除图像按钮,注释掉部分:
...
buttons.code = makeButton("wmd-code-button", getString("code"), "-80px", bindCommand("doCode"));
/*
buttons.image = makeButton("wmd-image-button", getString("image"), "-100px", bindCommand(function (chunk, postProcessing) {
return this.doLinkOrImage(chunk, postProcessing, true);
}));
*/
makeSpacer(2);
...
一个saavy降价用户可能知道如何在不输入图像然而,使用按钮。为了赶上这一点,你可以不喜欢在Markdown.Converter.js
如下:
转到_DoImages
功能,并替换这一行:
text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeImageTag);
像这样的东西之一:
text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, "IMAGES NOT SUPPORTED");
而且再次,这条线:
text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeImageTag);
与此:
text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, "IMAGES NOT SUPPORTED");
现在,无论转换器如何为图片找到降价,它都会将其替换为“IMAGES NOT SUPPORTED”(包括在预览窗口中)。这可能是也可能不是你想要的,但你也可以用一个空字符串,其他标签替换...
相关问题
- 1. 如何防止逐渐显示页面?
- 2. 防止Fancybox显示图像
- 3. 当页面仍在等待远程图像时,防止显示图像URL
- 4. 防止页面显示在iframe外部
- 5. 防止页面和图像闪烁
- 6. 防止显示图像上拖动
- 7. 如何防止页面刷新时再次显示jGrowl消息?
- 8. 如何防止在django项目中显示管理页面
- 9. 如何防止用户未登录时显示一个页面?
- 10. 如何防止突出显示图标?
- 11. 如何防止null显示?
- 12. 如何防止图片另存为+防止图像拖放到桌面+防止截图在桌面浏览器
- 13. 防止页面
- 14. 动态图像,防止从生成图像的页面缓存
- 15. 如何防止图像控制“可选”/显示选择边框?
- 16. 如何防止部分加载的图像显示?
- 17. 防止在封面图像涂料之前显示底部图像
- 18. DOM显示图像加载,但页面不显示图像
- 19. 如何防止使用css加载图像时显示图像替代文本
- 20. 如何防止当前显示的最后一个图像出现图像?
- 21. 如何在html页面中显示肖像图像
- 22. 防止图像
- 23. 页面停止显示
- 24. 如何在类别页面中显示每个图库图像
- 25. 如何防止页面加载滚动
- 26. 如何防止页面刷新?
- 27. 如何防止JSP页面刷新
- 28. 如何防止用户移动页面?
- 29. 如何防止页面被刷新?
- 30. 如何防止从萤火虫页面?