Skip to content

chore: downgrade tinymce from 7.7.1 to 6.8.3 in package.json #40465

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

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

rahulbarwal
Copy link
Contributor

@rahulbarwal rahulbarwal commented Apr 29, 2025

Description

Following the first proposed option, this PR downgrades the tinymce dependency back to the latest available 6.x version, which is still covered under the MIT license.
This ensures Appsmith remains compliant with its Apache-2.0 licensing terms without needing to replace the editor entirely.

Implementation Details

•	Reverted the tinymce dependency to ^6.8.3.
•	Confirmed editor functionality remains intact after the downgrade.
•	Updated any lockfiles as necessary.

Additional Notes

•	If/when Appsmith decides to upgrade or swap editors in the future, alternatives that are Apache-2.0-compatible should be considered.
•	No user-facing changes are expected from this downgrade.

Fixes #40365
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags="@tag.Sanity, @tag.RichTextEditor"

🔍 Cypress test results

Warning

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14723969208
Commit: 9def459
Cypress dashboard.
Tags: @tag.Sanity, @tag.RichTextEditor
Spec:
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.


Tue, 29 Apr 2025 05:26:36 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Downgraded the "tinymce" editor dependency to version 6.8.3.
    • Improved text formatting behavior in the rich text editor for a smoother editing experience.

@rahulbarwal rahulbarwal requested a review from riodeuno as a code owner April 29, 2025 03:45
@rahulbarwal rahulbarwal enabled auto-merge (squash) April 29, 2025 03:45
Copy link
Contributor

coderabbitai bot commented Apr 29, 2025

Walkthrough

The change downgrades the "tinymce" dependency in the app/client/package.json file from version 7.7.1 to 6.8.3. Additionally, it removes the explicit "trigger": "space" property from all text pattern configurations in the TinyMCE editor initialization within the rich text editor widget, allowing TinyMCE's default trigger behavior to apply. There were no other modifications to dependencies, scripts, or exported/public entities.

Changes

File(s) Change Summary
app/client/package.json Downgraded "tinymce" dependency from 7.7.1 to 6.8.3
app/client/src/widgets/RichTextEditorWidget/.../index.tsx Removed explicit "trigger": "space" from markdown text pattern configurations in TinyMCE init

Assessment against linked issues

Objective Addressed Explanation
Downgrade TinyMCE to 6.x to resolve GPL license conflict (#40365)

Poem

TinyMCE takes a gentle leap,
From seven down to six, a promise to keep.
Licenses now in harmony, MIT and Apache, too,
The codebase sings, "No more legal ado!"
🎉


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rahulbarwal rahulbarwal self-assigned this Apr 29, 2025
@github-actions github-actions bot added Community Reported issues reported by community members Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Rich Text Editor Widget Task A simple Todo Widgets Product This label groups issues related to widgets skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Apr 29, 2025
@rahulbarwal rahulbarwal added the ok-to-test Required label for CI label Apr 29, 2025
@rahulbarwal rahulbarwal requested a review from a team as a code owner April 29, 2025 04:00
@rahulbarwal rahulbarwal requested review from vivek-appsmith and removed request for a team April 29, 2025 04:00
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 6df090c and 9def459.

📒 Files selected for processing (1)
  • app/client/src/widgets/RichTextEditorWidget/component/index.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check

Comment on lines 462 to 470
text_patterns: [
{ start: "#", format: "h1", trigger: "space" },
{ start: "##", format: "h2", trigger: "space" },
{ start: "###", format: "h3", trigger: "space" },
{ start: "1.", cmd: "InsertOrderedList", trigger: "space" },
{ start: "*", cmd: "InsertUnorderedList", trigger: "space" },
{ start: "-", cmd: "InsertUnorderedList", trigger: "space" },
{ start: ">", cmd: "mceBlockQuote", trigger: "space" },
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

The comment on line 462 might need to be updated to match the implementation

The comment states that text patterns are configured "to use space key trigger", but the implementation no longer specifies a trigger, meaning it will use TinyMCE's default behavior instead of explicitly requiring a space key press. This change is consistent with the TinyMCE downgrade from 7.7.1 to 6.8.3.

- // Configure text patterns to use space key trigger for markdown-style formatting
+ // Configure text patterns for markdown-style formatting

🏁 Script executed:

#!/bin/bash
# Check TinyMCE 6.x documentation for default text pattern behavior
rg -A 5 -B 5 "text_patterns" --glob "*.md" || echo "No documentation found for text_patterns in the repository"

Length of output: 169


Update comment to reflect default TinyMCE trigger behavior

The existing comment still mentions an explicit “space key trigger,” but since we rely on TinyMCE’s default trigger now, the comment should be adjusted.

• File: app/client/src/widgets/RichTextEditorWidget/component/index.tsx
• Line: 462

- // Configure text patterns to use space key trigger for markdown-style formatting
+ // Configure text patterns for markdown-style formatting
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
text_patterns: [
{ start: "#", format: "h1", trigger: "space" },
{ start: "##", format: "h2", trigger: "space" },
{ start: "###", format: "h3", trigger: "space" },
{ start: "1.", cmd: "InsertOrderedList", trigger: "space" },
{ start: "*", cmd: "InsertUnorderedList", trigger: "space" },
{ start: "-", cmd: "InsertUnorderedList", trigger: "space" },
{ start: ">", cmd: "mceBlockQuote", trigger: "space" },
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],
// Configure text patterns for markdown-style formatting
text_patterns: [
{ start: "#", format: "h1" },
{ start: "##", format: "h2" },
{ start: "###", format: "h3" },
{ start: "1.", cmd: "InsertOrderedList" },
{ start: "*", cmd: "InsertUnorderedList" },
{ start: "-", cmd: "InsertUnorderedList" },
{ start: ">", cmd: "mceBlockQuote" },
],

@rahulbarwal rahulbarwal merged commit 82cf730 into release Apr 29, 2025
45 checks passed
@rahulbarwal rahulbarwal deleted the rahulbarwal/tinymce-version-downgrade branch April 29, 2025 04:54
@vivek-appsmith vivek-appsmith added the Unplanned Work - Q&W Work items that are unplanned label Apr 29, 2025
@coderabbitai coderabbitai bot mentioned this pull request May 1, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Reported issues reported by community members ok-to-test Required label for CI Query Widgets & IDE Pod All issues related to Query, JS, Eval, Widgets & IDE Rich Text Editor Widget skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo Unplanned Work - Q&W Work items that are unplanned Widgets Product This label groups issues related to widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: GPL License Conflict Due to TinyMCE 7 Upgrade
3 participants