We have having the usual problem of copypasting text from Word and some other text editors, which inserts invisible code (visible with view code option on the editor).
It would be great if we could be able customize Voyager's editor to include "clean paste" feature to the default editor, or even change the editor altogether. Is this possible, or is there a clean way to modify the default editor?
Modern browsers/operating systems (not sure where the actual implementation is) allow you to "Paste as plain text". It's not really Voyager's responsibility to worry about what you've copied, only to accept it.
Did you check summernote WYSIWIG editor? Really heavy and customizable rich editor. Maybe this should be implemented to the Voyager.
Chatter forum package for Laravel is a great example, offering a configuration option for changing the editor.
Anyhow, does anyone know a clean way to customize Voyager for changing the editor?
I've installed mewebstudio/Purifier which works well when outputting page's body content to page. But is there some clean way to hook into Voyager's save method and run this clean method before saving the site manager's content to database?
Problem solved, just needed to add 'paste' plugin to _public/vendor/tcg/voyager/assets/js/voyager_tinymce.js_ file line 19.
Just to comment further on the paste plugin.
Here's the specs on the plugin - https://www.tinymce.com/docs/plugins/paste/
image_title: true I added a , and thenpaste_word_valid_elements: "b,strong,i,em,u,h1,h2,h3,h4,ol,ul,li"Short question: under Voyager 1.x I've copied the voyager_tinymce.js from the vendor folder to: public/vendor/tcg/voyager/assets/js/voyager_tinymce.js
I've applied changes and cleared the cache+views yet I'm not seeing any change in the actual text editor on the admin.
I even tried editing the original file location under /vendor/tcg/voyager.... with no effect.
Do I need to run/clear something else to see the changes?
@sysmesh, please don't comment on closed issues. You can open your own or ask on our slack group.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
Chatter forum package for Laravel is a great example, offering a configuration option for changing the editor.
Anyhow, does anyone know a clean way to customize Voyager for changing the editor?