StackExchange / StackExchange/Stacks-Editor

Add the ability to change the code block language in rich text mode

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
TypeScript
Stars
437
Forks
61
Avg merge
16h 2m
Merged PRs (30d)
8

Description

Reported on Meta.SE.

This was mentioned in another answer I believe, but I would like to add some mock UX for an idea of how it can work and look.

I just added an arrow next to the language to make it look like a selector.

When clicking on the language, a dialogue would appear with possible selection. For example, a list similar to the following.

✓ auto
-------
c#
css
html
javascript
plaintext
python

Another idea would be to show a dialogue similar to the image's details dialogue. Although this can be annoying and would much prefer the option above.

enter image description here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the rich-text code block UI and its existing language handling, then clarify the selector behavior and supported language list from the proposed UX; done means a user can change a block's language in rich text mode and the selected language is reflected correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.