Skip to content

Cannot pass in config options as an object #51

@MostafaNabi

Description

@MostafaNabi

Hey everyone,
Im trying to pass in config options as an object like below

defaultConfig: RichTextConfigOptions = {
    removed_menuitems: 'undo redo',
    menu: {
      file: { title: 'File', items: 'newdocument restoredraft | preview | export print | deleteallconversations' },
    }
  }

  render() {
    return (
      <div id="rich-text-editor-wrapper">
        <script src='./tinymce.min.js' />
        <tinymce-editor
          menubar="false"
          config={this.defaultConfig}
        ></tinymce-editor>
      </div>
    );
  }

But it does not seem to register the attribute. The only reference on how to do this in the docs is this: https://www.tiny.cloud/docs/tinymce/6/webcomponent-ref/#setting-additional-configuration-options
which involves passing in a string matching an object in the global config, which isn't a very realistic scenario. Any help would be greatly appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions