Summernote-图片网址,而不是Base64 [英] Summernote - Image url instead of Base64

查看:91
本文介绍了Summernote-图片网址,而不是Base64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Summernote所见即所得编辑器将图像文件编码为Base64.好吧,这似乎很方便,但是我希望数据库能够长期大量使用.这将导致一些问题-搜索缓慢,实现图片库等...

Summernote wysiwyg editor encodes image files into Base64. Well, this seems handy but I expect the DB to be used quite heavily for a long term. This will cause some issues - searching slow, implementing image library, and etc...

我想知道它是否可以关闭此编码选项并使用'insertting url'方法intead.我一直在寻找它,但还没有成功.

I wonder if it has a option to turn this encoding option off and use 'inserting url' method intead. I've been looking for it but no great success yet.

例如,而不是存储诸如...之类的图像

For example, instead of storing images like...

<img style="width: 640px;" src="data:image/jpeg;base64,/9j/4Qv6RXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAeAAAAcgEyAAIAAAAUAAAAkIdp...............>

应该是...

<img src="/images/blah/blah.jpg.">

有任何文档吗?或任何示例可供参考?

Any documentation? or any examples to refer?

谢谢!

推荐答案

您需要为onImageUpload()编写自定义函数.

You need to write custom function for onImageUpload().

我正在寻找解决方案.发现以下内容: Summernote图片上传

I was looking for a solution. Found this: Summernote image upload

这篇关于Summernote-图片网址,而不是Base64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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