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

Enhance Language Selection with a Dropdown List for Syntax Highlighters. #8

Open
keertyverma opened this issue Aug 10, 2024 · 1 comment

Comments

@keertyverma
Copy link

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.

image

Proposed Improvement:

  1. 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.

  2. 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!

@calumk
Copy link
Owner

calumk commented Sep 5, 2024

@keertyverma Something like this? (not yet finished)
If a prefefined set of languages is provided, then a select to choose them is provided,
Else it falls back to the text-entry method?

image image

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

No branches or pull requests

2 participants