dotCMS / dotCMS/core

Add Mark for Inline Code in Block Editor

Open
#31,254 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Team : Falcon Type : New Functionality
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

User Story

As a user, I want to be able to include code snippets inline with paragraph/list/etc text in the Block Editor. We've got a code block, but things can get awkward when we're just trying to apply monospace/other code stylings to a single variable name or similar within otherwise normal text.

It is possible for a dotCMS user to create a custom mark to serve this role, but I think it would be even better to include inline code as a standard/default Block Editor mark.

EDIT: It seems that surrounding inline code with backticks does create an obvious code block on the back end; this is not necessarily styled on the front, and there's no way to undo that styling without deleting the modified text and retyping. So, I really think a bubble-menu button would be a straightforward improvement.

Acceptance Criteria
  • Add code mark for non-code-block text There's a chance this has already been implemented, though results seem inconsistent (see below, and similar recent instances)
  • Add button to bubble menu to apply code mark
Proposed Objective

User Experience

Proposed Priority

Priority 3 - Average

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

Start with the Block Editor's existing inline-code behavior and bubble menu, checking whether a code mark is already available and why backtick-created code is inconsistent. Done means the bubble menu exposes a button that applies the inline code mark to non-code-block text and allows the resulting styling to be removed.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.