Summernote - image url instead of base64 MVC
See original GitHub issueSummernote 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/2wCEAAkGBxMj...........>
it should be
<img src="/Upload/apple.jpg">
Create.cshtml
<div class="form-group">
@Html.LabelFor(model => model.long_Description, htmlAttributes: new { @class = "control-label col-md-4" })
<div id="summernote"></div>
<div class="col-md-10">
@Html.TextAreaFor(model => model.long_Description, new { @id = "long_Description", @style = "display:none;", @class = "form-control" })
@Html.ValidationMessageFor(model => model.long_Description, "", new { @class = "text-danger" })
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#summernote').summernote(
{
tabsize: 2,
height: 150
});
var editor = $('#long_Description').html();
$('#summernote').html(editor);
$('#editorbtn').hover(function () {
var editor = $('.note-editable').html();
$('#long_Description').html(editor);
});
});
</script>
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Summernote - Image url instead of Base64 - Stack Overflow
Summernote wysiwyg editor encodes image files into Base64.
Read more >how can we get Image url instead of Base64 using ... - MSDN
According to your description,Summernote editor will encodes image files into Base64. I guess you would like to save file in database, ...
Read more >Summernote - image url instead of base64 MVC - CodeProject
What I have tried: Summernote editor encodes image files into Base64. I wonder if it has a option to turn this encoding option...
Read more >Using Summernote In ASP.NET MVC (Saving Image Files ...
In this article, you will learn how to use Summernote in ASP. ... the path in Summernote to save the image URL instead...
Read more >Deep dive - Summernote
picture : open image dialog; link : open link dialog; video : open video dialog; table : insert a table; hr : insert...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You have to upload an actual file to a server to point to it. Base64 encoded option just encodes image into text and add to the content you are editing.
I made a quick and primitive plugin, that handles file upload with ajax: https://github.com/tomaac/summernote-ajaxfileupload
Another option so you don’t have to create your own code, is to check out and use elFinder. https://github.com/semplon/summernote-ext-elfinder And there’s also an example in the elFinder wiki, specifically for Summernote: https://github.com/Studio-42/elFinder/wiki/Integration-with-Multiple-Summernote-(fixed-functions)