Closed wjw020206 closed 2 weeks ago
The changes to the SelectLangMenu
class introduce a new property, defaultCodeLang
, to store the default programming language. The getOptions
method now includes a selected
property to mark the chosen language, updating defaultCodeLang
accordingly. Additionally, the getValue
method has been modified to return defaultCodeLang
instead of an empty string when no valid selection is found, enhancing the method's robustness and consistency.
Files | Change Summary |
---|---|
packages/code-highlight/src/module/menu/SelectLangMenu.ts |
Added defaultCodeLang property to store the default language. Updated getOptions and getValue methods for improved selection handling. |
sequenceDiagram
participant User
participant SelectLangMenu
participant LanguageOptions
User->>SelectLangMenu: Request language options
SelectLangMenu->>LanguageOptions: Fetch available languages
LanguageOptions-->>SelectLangMenu: Return languages
SelectLangMenu->>User: Display languages with selection
User->>SelectLangMenu: Select language
SelectLangMenu->>SelectLangMenu: Update defaultCodeLang
SelectLangMenu->>User: Confirm selection
🐰 In the meadow, languages bloom,
A default choice dispels the gloom.
With a hop and a skip, we select with glee,
Code flows like rivers, wild and free!
Hooray for the change, let’s celebrate,
A menu so bright, it’s simply great! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
https://github.com/cycleccc/wangEditor-next/issues/155
Summary by CodeRabbit
New Features
Bug Fixes