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.
@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?
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!