Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Create.cshtml

C++
<pre>  <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>

 <input type="submit" value="Add" id="editorbtn" class="btn btn-primary" />


What I have tried:

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...
C++
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUSERMWFRUVERUVEBUWFRUVFRYVFRUWFxUVFRUYHSggGBolGxUVIT..........>

it should be <img src="/Upload/apple.jpg">
Posted
Updated 26-Nov-19 5:58am
v4

1 solution

You should talk to the people who created it - Summernote - Super Simple WYSIWYG editor[^] - they should provide technical support and will know more about their product than we will. If they don't, then find another supplier and demand your money back!
 
Share this answer
 
Comments
Member 13582084 11-Jan-18 4:37am    
Summernote free. I did not pay money.
OriginalGriff 11-Jan-18 4:45am    
So? Still contact them - if they can't do it, they may think it a good idea and add it for you...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900