Skip to content

🐛 fix(vditor): avoid clearing classes set by vditor when setting class #2398

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 2 commits into from
May 8, 2025

Conversation

capdiem
Copy link
Contributor

@capdiem capdiem commented May 8, 2025

Fixes #2392

@capdiem capdiem requested a review from Copilot May 8, 2025 06:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issue #2392 by ensuring classes set by Vditor are preserved when applying custom classes to the markdown component. The key changes include:

  • Introducing a new BuildComponentClass method that always returns "vditor" as a default class.
  • Conditionally adding "vditor-dark" based on the provided Options' theme.
  • Preventing accidental override of the default vditor class.

@Qinyouzeng Qinyouzeng merged commit d23908f into main May 8, 2025
1 check passed
@Qinyouzeng Qinyouzeng deleted the bugfix/vditor-class branch May 8, 2025 06:36
capdiem added a commit that referenced this pull request May 8, 2025
#2398)

* 🐛 fix(vditor): avoid clearing classes set by vditor when setting class

* update comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] MMarkdown更新Class后,样式异常
2 participants