summernote

CollectionFS, Meteor.js, Summernote(WYSIWYG) and file upload

流过昼夜 提交于 2019-12-06 12:43:35
问题 I'm working on a project using Meteor.js, Summernote and Collection FS. First of, here is my code. Template.postSubmit.rendered = function() { $('#summernote').summernote({ height: 400, maxHeight:800, minHeight:250, onImageUpload: function(files, editor, $editable) { Images.insert(files[0], function (err, fileObj) { editor.insertImage($editable, fileObj.url()); }); } }); The image when inserted does successfully go into the specified URL for image storage. Here is the CollectionFS javascript.

summernote image upload and alternative not working

六眼飞鱼酱① 提交于 2019-12-06 08:10:18
问题 I am using summernote editor on my site and have implemented it using the Click2edit method mentioned on their site here. However the image upload if used as it is causes all sorts of problems. My understanding is this is using something called base64. I tried to replace this with a more straight forward file upload to the server using code from another stackoverflow answer [here]. (Summernote image upload) However it doesn't seem to be doing anything, the image still gets inserted the

Summernote-angular custom button in toolbar

故事扮演 提交于 2019-12-06 01:58:44
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-for-insert2", "value-for-insert3"]; }]); I can edit summernote source code to achieve that, of course.

How to add image manager in Summernote WYSIWYG editor?

ⅰ亾dé卋堺 提交于 2019-12-05 18:02:37
问题 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

Adding disable/enable methods to Summernote editor

不羁的心 提交于 2019-12-05 05:07:58
I have been using summernote editor for a while now and it's working for most of the things I've needed it for. However, I recently wanted it disabled ( not destroyed ) after a user action. After efforts without success, it occurred to me I could use the destroy() method to achieve what I wanted. I noticed that Summernote still turned an already disabled textarea to its editor, with the writing area disabled. Here is what I finally did: To disable summernote after creating it: I first destroyed it, then disabled the target element, and finally re-initialized it: $(".summernoteTarget").destroy(

CollectionFS, Meteor.js, Summernote(WYSIWYG) and file upload

假装没事ソ 提交于 2019-12-04 18:22:23
I'm working on a project using Meteor.js, Summernote and Collection FS. First of, here is my code. Template.postSubmit.rendered = function() { $('#summernote').summernote({ height: 400, maxHeight:800, minHeight:250, onImageUpload: function(files, editor, $editable) { Images.insert(files[0], function (err, fileObj) { editor.insertImage($editable, fileObj.url()); }); } }); The image when inserted does successfully go into the specified URL for image storage. Here is the CollectionFS javascript. Images = new FS.Collection("images", { stores: [new FS.Store.FileSystem("images", {path: "~/img"})] })

using summernote with vue.js 2

六眼飞鱼酱① 提交于 2019-12-04 04:49:01
问题 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

How to set text into Summernote textarea with Capybara + Poltergeist

本秂侑毒 提交于 2019-12-04 03:47:23
问题 I have a textarea which is using Summernote and I set onChange event to it. I want to write test with RSpec + Capybara + Poltergeist to confirm the onChange event is working. As far as I checked, the textarea displayed in browser is actually div tag with 'note-editable' css class. How can I set text to it and fire onChange event? I wrote a code like this, but got an error Capybara::ElementNotFound: Unable to find field "Some label" : visit edit_foo_path fill_in 'Some label', with: 'Foo bar'

summernote js upload image

走远了吗. 提交于 2019-12-04 03:43:39
问题 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'

How to set font-size in summernote?

一曲冷凌霜 提交于 2019-12-04 03:26:54
问题 I have been using summernote as my default text editor but I haven't been able to set a particular font-size by default when i initialize it. so far I have tried $('.active-textcontainer').summernote({ toolbar: [ ['style', ['bold', 'italic', 'underline']], ['fontsize', ['fontsize']], ['color', ['color']], ['para', ['ul', 'ol', 'paragraph']] ], height:150, fontsize:'18px' }); and $('.active-textcontainer').summernote({ toolbar: [ ['style', ['bold', 'italic', 'underline']], ['fontsize', [