keystonejs/keystone-classic

Keystone deletes keys that have a function as a value when setting options for TinyMCE

Open

#3,728 创建于 2016年11月23日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)JavaScript (2,288 fork)batch import
bughelp wanted

仓库指标

Star
 (14,656 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Steps to reproduce the behavior

  1. Install an external plugin like tinyvision
  2. 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() {}
        }
    }
});
  1. Create a route to intercept the request and load the plugin. The approach has been described in this comment.
  2. 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.

贡献者指南