keystone: Wysiwyg TinyMCE editorConfig not working

I am trying to add the config for the TinyMCE field, but there is no change at all. I am using a config from a sample of TinyMCE website. Am I doing something wrong? I tried many ways to make it work but none worked.

const { Wysiwyg } = require('@keystonejs/fields-wysiwyg-tinymce');
fields: {
        title: { type: Text, schemaDoc: 'Title for published article' },
        text: {
            type: Wysiwyg, editorConfig: {
                plugins: [
                    'advlist autolink lists link image charmap print preview anchor',
                    'searchreplace visualblocks code fullscreen',
                    'insertdatetime media table paste code help wordcount'
                  ],
                  toolbar: 'undo redo | formatselect | ' +
                  ' bold italic backcolor | alignleft aligncenter ' +
                  ' alignright alignjustify | bullist numlist outdent indent |' +
                  ' removeformat | help',
                content_css: [
                    '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
                    '//www.tiny.cloud/css/codepen.min.css'
                ]
            }
        },
}

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 22 (12 by maintainers)

Most upvoted comments

You just need to bump the'@keystonejs/fields-wysiwyg-tinymce' dependency in your project to the latest version and run yarn or npm up depending on what package manager you use.

The update doesn’t include an apiKey option, though. I’ll have to handle that separately.

The editorConfig option should now be available if you update your package.

Oof! The version of @keystonejs/fields-wysiwyg-tinymce with the editorConfig setting hasn’t been released yet. Once #2447 is merged and you update your package everything will work.

Sorry for the confusion. The doc update got deployed before the package was 😬