summernote

Summernote - Image url instead of Base64

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 02:22:56
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... 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

How to add image manager in Summernote WYSIWYG editor?

只愿长相守 提交于 2019-12-04 02:17:33
I had tried many WYSIWYG editors like TinyMCE, Ckeditor, and Summernote. I like the simplicity of Summernote and the edit/save feature, but summernote seems not have an image manager plugin like TinyMCE or CKEditor. My webapp has a pool (media library) of photos which can be uploaded by an individual user. I would like to have an feature that allows the user to select the photos from the pool, and adds it into the textarea when editing an article in Summernote (just like Wordpress did). Could anyone give me some hint how to accomplish this feature by hand if truly no plugin supported? as seen

summernote(富文本编辑器)将附件与图片上传到自己的服务器(vue项目)

笑着哭i 提交于 2019-12-03 22:42:26
1.上传图片至自己的服务器 (这个官方都有例子,重点介绍附件上传) 图片上传官方网址 // onChange callback $('#summernote').summernote({ callbacks: { onChange: function(contents, $editable) { console.log('onChange:', contents, $editable); } } }); // summernote.change $('#summernote').on('summernote.change', function(we, contents, $editable) { console.log('summernote\'s content is changed.'); }) summernote是一款富文本编辑器,但是他上传的图片的时候,图片会以二进制的形式存入数据库字段中,这时候就很占资源,所以我们希望图片能存入自己的服务器,在字段中就以链接地址的形式存放,这时候就需要在上传图片的时候进行处理,所以callbacks下面的onImageUpload进行图片文件的处理。 示例 : //初始化定义 var _this=this; this.curEle=$('#'+this.id); var fileUploadBtn=this.template; this

Summernote and form submission in MVC c#

三世轮回 提交于 2019-12-03 11:46:21
I am using the summernote plugin for text box: http://summernote.org/#/getting-started#basic-api This is the form I have using summmernote: <div class="modal-body" style="max-height: 600px"> @using (Html.BeginForm()) { @Html.ValidationSummary(true) <fieldset class="form-horizontal"> <div id="textForLabelLanguage"></div> <button type="submit" class="btn btn-primary">Save changes</button> @Html.ActionLink("Cancel", "Index", null, new { @class = "btn " }) </fieldset> } </div> <script type="text/javascript"> $(document).ready(function () { $('#textForLabelLanguage').summernote(); }); </script> Now

Textarea value change when summernote div is changed

江枫思渺然 提交于 2019-12-03 11:39:44
问题 I have setup a div for the summernote to alter text pulled from a database. <div id="summernote" class="form-control"><?php echo $laws['content']; ?></div> $(document).ready(function() { $('#summernote').summernote({ height: 300, }); }); directly following the div I have a text area with an ID. <textarea id="lawsContent"></textarea> I want the content of the textarea to change as I type in the summernote div. Just like what is happening while I am typing this question. 回答1: Using the

Custom toolbar with Summernote

大兔子大兔子 提交于 2019-12-03 08:17:34
问题 How do I know which functions can be enabled for the toolbar of summernote, and how to do it? In the API docs all I can find is "toolbar : Array (optional)" without further explanation. I've managed to enable some features thanks to one of the examples, but how can I also enable: code, indent and outdent? $(".summernote").summernote({ styleWithSpan: false, toolbar: [ ['style', ['bold', 'italic', 'underline', 'clear']], ['color', ['color']], ['para', ['ul', 'ol']] ] }); 回答1: in settings.js You

Summernote - Image url instead of Base64 MVC

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Summernote editor encodes image files into Base64.I wonder if it has a option to turn this encoding option off and use 'inserting url' method instead. I've been looking for it but no great success yet. For example, instead of storing images like... <img src = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUSERMWFRUVERUVEBUWFRUVFRYVFRUWFxUVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGhAQGi0lHyUtLS0tLS0tLSstLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAKgBKwMBEQACEQEDEQH

using summernote with vue js 2

匿名 (未验证) 提交于 2019-12-03 02:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i want to use summernote in my vue js 2 spa, and because not all my page using summernote so i make summernote to be a component by adding export default { editor_function(){ //summernote function in summernote.min.js } } and then i just import it in my .vue file that need summernote and call editor_function on mounted() function but i got error unknown codemirror when npm compile my vue project into single app.js file. so i went into just include summernote.min.js in my index.html and thats mean it will be loaded before vue js spa is

summernote js upload image

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using summernote version 0.8.1 (current). It's working. But 1 thing I struggle with. Inserting an image, rather than putting base64 dataURL, I want to upload the image to the server and insert the image URL in the database. This is my code: <script> $(document).ready(function() { $('#summernote').summernote({ lang: 'fr-FR', height: 300, toolbar : [ ['style',['bold','italic','underline','clear']], ['font',['fontsize']], ['color',['color']], ['para',['ul','ol','paragraph']], ['link',['link']], ['picture',['picture']] ], onImageUpload:

Summernote image upload

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have problem with editor Summernote. I want to upload images into a catalog on server. I have some script: <script type = "text/javascript" > $ ( function () { $ ( \' . summernote\' ). summernote ({ height : 200 }); $ ( \' . summernote\' ). summernote ({ height : 300 , onImageUpload : function ( files , editor , welEditable ) { sendFile ( files [ 0 ], editor , welEditable ); } }); }); </script> <script type = "text/javascript" > function sendFile ( file , editor , welEditable ) { data = new FormData (); data . append ( "file" ,