summernote

How to upload Excel file using Summernote?

帅比萌擦擦* 提交于 2019-12-12 14:03:17
问题 I am implementing CMS tool in my website and for that I'm using Summernote Editor. Now I want to upload Excel file using Summernote. How can I upload Excel file using Summernote? Below is the code that creates a custom button for File upload. Clicking that button open a file browser from where I can select file, but I am not getting what to do next to show path or name("~/uploads/abc.xls" / abc.xls) of the selected file in editor to let user know that selection completed. Make it editable

Summernote - On focus, insert cursor at the end of editor

我的梦境 提交于 2019-12-12 11:53:00
问题 When the Summernote text editor initializes with the focus property set to true , the editor gains focus but places the cursor at the beginning of the editor. My preference would be to have the cursor placed where the user had clicked initially. At a bare minimum I would just need to place the cursor at the end of the editor. The Summernote API doesn't seem to directly support this and I've tried various hacky looking solutions; Such as emptying the text area, creating the editor, then

repeat the summernote editor for all the textareas in same page

戏子无情 提交于 2019-12-11 16:18:10
问题 I have a cshtml viewpage like below <div class="form-group"> @foreach (var fields in Model.ListProductFields) { @Html.LabelFor(x => x.ProductFieldNameEn, fields.FieldName, htmlAttributes: new { id="", @class = "control-label col-md-2" }) <div class="col-md-10"> @Html.TextAreaFor(model => model.FieldValue, new { htmlAttributes = new { @class = "form-control", @row = 5 } }) </div> } </div> using above div section I can populate multiple textareas with its relavant label this is how it shows

Summernote - Delete image from server

一笑奈何 提交于 2019-12-11 11:47:45
问题 Hi I have used the code from the following link to allow images to be uploaded to the server. Summernote image upload Would it be possible to implement something similar to remove an image from the server if a user deletes it from the editor? If so, how can I go about achieving this? 回答1: To Delete file form Server, you need to use onMediaDelete but usage varies with different summernote versions, sometimes difficult to find in the docs. FOR SUMMERNOTE 0.6.x $(document).ready(function() { $('

How to set image extensions for insert image dialog of Summernote

女生的网名这么多〃 提交于 2019-12-11 06:44:57
问题 I am using Summernote and everything works fine but there is one thing I can't figure out. Below is the settings I am using for SummerNote: summerNoteElement.summernote({ toolbar: [ ['magic', ['style', 'h1', 'h2', 'h3', 'h4']], ['actions', ['undo', 'redo']], ['style', ['bold', 'italic', 'underline', 'clear']], ['font', ['fontname', 'strikethrough', 'superscript', 'subscript']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']], ['height', ['height']], [

summernote 0.8.8 onimageupload example

一曲冷凌霜 提交于 2019-12-11 04:38:06
问题 Does anyone have a good example of the code to use Summernote 0.8.8 that uploads images to a directory on the server (not as base64)? I tried some of the older posted results(they might have worked with older versions of Summernote),but nothing seams to work for me. I'm not strong on Java, so I'm not sure how to fix the issue. Summernote's web example is $('#summernote').summernote({ callbacks: { onImageUpload: function(files) { $summernote.summernote('insertNode', imgNode); } } }); $('

jQuery promises with summernote hints

寵の児 提交于 2019-12-10 11:35:59
问题 I am working on getting a live user list from a database for the Summernote Hints however when using async it just falls over, however with async off it causes the UI to freeze... clearly not optimal for the UX. $(document).ready(function() { $('.editor').summernote({ height: 300, hint: { match: /\B@(\w*)$/, users: function(keyword) { var result = data; $.ajax({ url: '/users/' + keyword, type: 'get', async: false //This works but freezes the UI }).done(function(data) { result = data; //Set

Summernote-angular custom button in toolbar

大憨熊 提交于 2019-12-07 14:09:18
问题 I want to use summernote editor on my page but I need to add special functionality for that. I want to add one button to summernote toolbar. This button should be something like dropdown where it is possible to select some value and this value should be inserted to current cursor position. Usage in my imagination: Html : <summernote some-values="values"></summernote> Angular controller : module.controller("ControllerName", ["$scope", ($scope) => { $scope.values = ["value-for-insert1", "value

几款主流好用的富文本编辑器(所见即所得常用编辑器)介绍

喜夏-厌秋 提交于 2019-12-06 23:47:16
富文本编辑器  富文本编辑器(Rich Text Editor,RTE)是一种可内嵌于浏览器,所见即所得的文本编辑器。它提供类似于Office Word 的编辑功能,方便那些不太懂HTML用户使用,富文本编辑器的应用非常广泛,它的历史与图文网页诞生的历史几乎一样长。  作为一个技术人员,手上备上两款富文本编辑器还是很有用的,指不定那个项目就要集成一个进去。到时候现找现用那可就费功夫了,毕竟从开发上讲,每个富文本编辑器的用法都是有区别的。  下面是我收集的一些业界比较受欢迎的富文本编辑器,喜欢的朋友、用过的朋友可以一起看看,一起探讨。 1、TinyMCE  TinyMCE是一个开源的所见即所得的HTML编辑器,界面相当清新,界面模拟本地软件的风格,顶部有菜单栏。支持图片在线处理,插件多,功能非常强大,易于集成,并且拥有可定制的主题。支持目前流行的各种浏览器,它可以达到微软Word类似的编辑体验。  而且这么好的东西还是开源免费的,目前一直有人维护,这款编辑器使用的人非常多。  更多介绍及下载: https://www.tiny.cloud/docs/demo/full-featured/ 2、CKEditor  Ckeditor也是一款非常经典的富文本编辑器,官方下载量过千万。它是在非常著名的FCkEditor基础上开发的新版本

jQuery promises with summernote hints

為{幸葍}努か 提交于 2019-12-06 16:41:00
I am working on getting a live user list from a database for the Summernote Hints however when using async it just falls over, however with async off it causes the UI to freeze... clearly not optimal for the UX. $(document).ready(function() { $('.editor').summernote({ height: 300, hint: { match: /\B@(\w*)$/, users: function(keyword) { var result = data; $.ajax({ url: '/users/' + keyword, type: 'get', async: false //This works but freezes the UI }).done(function(data) { result = data; //Set the result to the returned json array }); return result; }, search: function (keyword, callback) {