keystonejs/keystone-classic
View on GitHubKeystone deletes keys that have a function as a value when setting options for TinyMCE
Open
#3728 opened on Nov 23, 2016
bughelp wanted
Description
Steps to reproduce the behavior
- Install an external plugin like tinyvision
- Configure Keystone to use it. The relevant configuration might look like this:
keystone.init({
// ...
'wysiwyg additional options': {
external_plugins: {
tinyvision: '/admin/js/lib/tinymce/plugins/tinyvision/plugin.min.js'
},
tinyvision: {
source: '/api/assets',
upload: function() {}
}
}
});
- Create a route to intercept the request and load the plugin. The approach has been described in this comment.
- Inspect the options passed to the plugin
Expected behavior
All the options should be passed
Actual behavior
Options that have a function as a value are deleted. To confirm this, try to set the value of upload to a number or a string and it'll be present.