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

Remember the language when creating a new code block #8722

Closed
neongreen opened this issue Dec 24, 2020 · 3 comments · Fixed by #9840
Closed

Remember the language when creating a new code block #8722

neongreen opened this issue Dec 24, 2020 · 3 comments · Fixed by #9840
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. intro Good first ticket. package:code-block squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@neongreen
Copy link

📝 Provide a description of the new feature

If I am using CKEditor to write an article, most of the time, when creating a new code block, I want to use the same code block language that I used the previous time. Otherwise I have to correct every single code block from "Plain text" to whatever programming language I am writing about.

It would be great to have this as a (perhaps opt-out?) feature.

Notion does this and it's been pretty intuitive.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@neongreen neongreen added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label Dec 24, 2020
@Reinmar Reinmar added domain:ui/ux This issue reports a problem related to UI or UX. package:code-block squad:core Issue to be handled by the Core team. labels Jan 4, 2021
@Reinmar Reinmar added this to the nice-to-have milestone Jan 4, 2021
@Reinmar Reinmar added the intro Good first ticket. label Jan 4, 2021
@Reinmar
Copy link
Member

Reinmar commented May 31, 2021

Implementation wise, it could be implemented inside the command. However, I think that the option to reuse the previous choice should be explicit – by default the command should not do so. It means that the command would have to accept a param like usePreviousLanguageChoice.

@przemyslaw-zan
Copy link
Member

Should this be the new default behavior, or off by default and only enabled by configuration?

@Reinmar
Copy link
Member

Reinmar commented Jun 9, 2021

It doesn't seem to have any negative effect on the UX so I'd go with this being on by default.

pomek added a commit that referenced this issue Jun 11, 2021
Feature (code-block): When inserting a new code block, instead of applying the default language (the first in the dropdown view), the feature re-use the previously inserted language. Closes #8722.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. intro Good first ticket. package:code-block squad:core Issue to be handled by the Core team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants