Customisation of attributes
- 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