-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enhance Language Selection with a Dropdown List for Syntax Highlighters. #8
Comments
@keertyverma Something like this? (not yet finished) ![]() ![]() |
Apologies for the delayed response! Your approach is close to what I had in mind, but there’s a slight difference. I was thinking of a dropdown listing languages from the code plugin settings, ensuring valid selections. If a language isn’t in the list, users can enter it in an input box at the top of the dropdown. Suggested Implementation
Let me know your thoughts! Thanks for working on this 😊 |
All of these are good suggestions but I am time short at the moment Are you able to work on any of this and raise a PR or no? |
Got it! I can work on this and raise a PR. I'll start implementing the approach I suggested and keep you posted. Thanks! |
Currently, when a user enters a language name, the CDN dynamically loads the corresponding syntax highlighter.
If the user mistypes the language name, the syntax highlighter fails to load properly, and the typo remains displayed in the bottom-right corner of the code editor.
This can cause confusion, as no error is raised if the syntax highlighter fails to load correctly, leaving users without feedback on the validity of their input.
Proposed Improvement:
Language Selection List: Replace the input box with a dropdown list of predefined languages. This ensures that only valid languages are selected, preventing syntax highlighter errors.
Custom Language Option: Provide a fallback mechanism allowing users to add custom languages to the list if their desired language is not available.
This update will enhance user experience by reducing errors and improving the accuracy of syntax highlighting.
Thanks for your help!
The text was updated successfully, but these errors were encountered: