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

fix: the wrong text is inserted after uploading an image #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ppodds
Copy link

@ppodds ppodds commented Feb 16, 2024

πŸ”— Linked issue

Resolves #334. Resolves #574.

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The original code inserted a link text after uploading the image. This pull request will correct it and ensure that the image name is respected when the file extension is included, particularly for known image extensions.

@@ -878,18 +878,10 @@ function afterImageUploaded(editor, url) {
var cm = editor.codemirror;
var stat = getState(cm);
var options = editor.options;
// TODO: Get the image name from the original file name
Copy link
Owner

Choose a reason for hiding this comment

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

Is this TODO something that needs to be added to this PR?

Copy link
Author

@ppodds ppodds Feb 18, 2024

Choose a reason for hiding this comment

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

No. If we want to add this feature, it will be a breaking change for the current API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants