Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Is it possible to append + prepend <span> tags without using Widgets?

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

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

The issue names MatchDecorator and WidgetType but no repository files or tests; start by checking the repository’s CodeMirror decoration examples and the relevant CodeMirror documentation. Done would be a clear explanation of how the shown markup can be produced, or a specific request for a supported way to achieve it.

Written by the indexing model from the issue text.

Description

I want to achieve this with codemirror

https://prnt.sc/m9ean50m9p2E

https://prnt.sc/HDSz9jvvBi33

as you can see in the second image, the html code is:

<div class="cm-line">
    testing 
	<span class="wa-marker">*</span>
	<span class="wa-bold">line</span>
	<span class="wa-marker">*</span>
</div>

I have tried using MatchDecorator, but it can only wrap ONE <span> tag around the MATCH

How is it possible that this example managed to prepend + append <span class="wa-marker">*</span> around the BOLD <span> tag?
Clearly they are not using WidgetType because there are no .cm-widgetBuffer <img>

How is it possible that they can achieve this?

they are using codemirror too

Dominant language
TypeScript
Stars
2.3k
Forks
162
Avg merge
2h 41m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from uiwjs/react-codemirror

All issues in uiwjs/react-codemirror

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.