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

Multi line format slyling #766

Closed
conditional opened this issue Feb 5, 2025 · 3 comments
Closed

Multi line format slyling #766

conditional opened this issue Feb 5, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@conditional
Copy link

A great idea

I want to be able to format multiple selected lines at once using a button or keyboard shortcut. For example, if I select two lines like:

Test1
Test2

and press the Unordered List button, I expect them to be transformed into:

  • Test1
  • Test2
@endic-sam928281
Copy link

Hello, we tried to solve the issue.

This is what we did:

Modified the directive2flag function in packages/MdEditor/utils/content-help.ts to handle formatting of multiple selected lines. Updated the unorderedList, orderedList, and task cases to split the selected text into lines and apply the formatting to each line.

You can review changes in this commit: endic-sam928281@424a9ed.

Caution

Disclaimer: The concept of solution was created by AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


Latta AI seeks to solve problems in open source projects as part of its mission to support developers around the world. Learn more about our mission at https://latta.ai/ourmission . If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.

@imzbf imzbf added the enhancement New feature or request label Feb 6, 2025
imzbf added a commit that referenced this issue Feb 7, 2025
@imzbf
Copy link
Owner

imzbf commented Feb 7, 2025

Implemented in 5.2.2, have a try

@imzbf imzbf closed this as completed Feb 7, 2025
@conditional
Copy link
Author

thank you! I'll try it early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants