basecamp / basecamp/trix

Customisation of attributes

Open
#923 0 comments 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
20k
Forks
1.1k
Avg merge
3d 12h
Merged PRs (30d)
13

Description

Hi,

I would like to insert a span with an attribute contentEditable into Trix editor text body, something like:

< span contenteditable="false" >text body< /span >

It is already feasible to add new textattributes for span, as using:

Trix.config.textAttributes.span = {
tagName: "span",
inheritable: true,
parser: false
}

But it is failed to add attribute contenteditable inside tag.

What is the right way to add this contenteditable attribute?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the Trix.config.textAttributes configuration and the text-attribute parsing behavior that handles span tags. Reproduce the requested contenteditable="false" span in the editor and verify that the attribute is preserved in the text body without changing other span attributes.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.