Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: TinyMce Custom Configuration #1978

Merged
merged 11 commits into from
Jun 6, 2024

Conversation

iOvergaard
Copy link
Collaborator

@iOvergaard iOvergaard commented Jun 3, 2024

Description

Some configurations such as statusbar, menubar, and other visuals are invalid to add after the editor has been rendered. To accommodate this, we are adding a config object to the manifest file which essentially supports the same options as the former CustomConfig in V13.

There is also a fix for async-loaded extensions, which were previously not considered after the editor was rendered. Now we have an observer on the extensions registry and in case a tinyMcePlugin is added or removed, we will re-render the editor and merge the new configuration.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How to test?

Dev server

  1. Turn on the VITE_UMBRACO_EXTENSION_MOCKS=on environment variable
  2. Notice that the RTE on the "All properties" page are shown with a statusbar and the wordcount plugin

You have to remove these lines from input-tiny-mce.defaults.ts to get the dev server to work:
image

CMS

  1. Add a manifest for tinyMcePlugin and attempt to add configuration
  2. Check that the API is also able to load and receive an arguments object with host and editor, which you can use to interact with the editor (this is already so before this fix, but make sure this hasn't been broken)

Screenshots (if appropriate)

image

@iOvergaard iOvergaard changed the title Add TinyMce Configuration Feature: TinyMce Configuration Jun 3, 2024
@iOvergaard iOvergaard changed the title Feature: TinyMce Configuration Feature: TinyMce Custom Configuration Jun 3, 2024
@iOvergaard
Copy link
Collaborator Author

For whoever is reviewing this: The npm run test seems to fail on Github, but I cannot reproduce it locally. Could someone else run through this, please?

Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, works as expected! 🚀

@leekelleher leekelleher merged commit 241ba50 into main Jun 6, 2024
6 checks passed
@leekelleher leekelleher deleted the v14/bugfix/tinymce-plugin-config branch June 6, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants