[SOLVED] Summernote editor full toolbar

Post Reply
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

[SOLVED] Summernote editor full toolbar

Post by Bedzeti »

Hello , I want to know if it's possible to have full Summernote editor with all functions and full toolbar in WonderCMS ??
Thanks
wiz
Admin
Posts: 496
Joined: Sat Oct 30, 2010 12:23 am

Re: Summernote editor full toolbar

Post by wiz »

Hi Bedzeti, yes it is possible.

Are there any specific features you are looking for?

New "features" in the toolbar can be added by editing the summernote.php file in /plugins/summernote/summernote.php.
The extra features are located in the: function loadSummerNoteJS($args).

Depending on the features you want to add, you edit the following list:

Code: Select all

toolbar: [
	// [groupName, [list of button]]
	['style', ['style']],
	['font', ['bold', 'italic', 'underline', 'clear']],
	['font', ['fontsize', 'color']],
	['para', ['paragraph']],
	['insert', ['link','image', 'doc', 'video']], // image and doc are customized buttons
	['misc', ['codeview']],
]
And here is the official list from Summernote: https://summernote.org/deep-dive/#customization
In the next release of WonderCMS, we're adding the "table" button again.

Is there any other functionality you would like to see in the Summernote toolbar with the next release of WonderCMS?
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Summernote editor full toolbar

Post by Bedzeti »

Hallo , thank for answer ,
Yes if it's possible I'm interested to have all features ,or minimum font names , direct insert and upload image from summernote to the edited page.And maybe fullscreen button .
Can you help me with this?
Thanks
Eduard

Oh Also if I edit any page there it's 3 editors first and the last dont hawe function to disable or enable - show or hide content .
wiz
Admin
Posts: 496
Joined: Sat Oct 30, 2010 12:23 am

Re: Summernote editor full toolbar

Post by wiz »

Code: Select all

toolbar: [
	// [groupName, [list of button]]
	['style', ['style']],
	['font', ['bold', 'italic', 'underline', 'clear']],
	['font', ['fontsize', 'color']],
	['font', ['fontname']],
	['para', ['paragraph']],
	['insert', ['link','image', 'doc', 'video']], // image and doc are customized buttons
	['misc', ['codeview', 'fullscreen']],
]
The above adds different fonts and the full screen button. Don't forget, summernote also supports drag and drop, you can just drop images from your computer into your website.

Can you create a screenshot of your issue?
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Summernote editor full toolbar

Post by Bedzeti »

Thank you very much.....
Its perfect...
Maybe you don't have any code to have in "Insert image or document" Select from files , like in master summernote , not only Image URL....

Look to attachment ..
Attachments
insert image.JPG
insert image.JPG (62.94 KiB) Viewed 13301 times
wiz
Admin
Posts: 496
Joined: Sat Oct 30, 2010 12:23 am

Re: Summernote editor full toolbar

Post by wiz »

I'm afraid this would take some modifications to show the native WonderCMS uploader in the Summernote bar.

The intended use for this was:
1. Upload file via Settings -> Files
2. Copy link to file from Settings -> Files (right click file and copy URL).
3. Paste link in the Summernote toolbar.

There was an old version which supported this, but I had to fork the editor and remove the vulnerability in the file uploader, that's why we created the file uploader in WonderCMS natively.
Post Reply