editor-js / editor-js/underline
JSON output instead of inline HTML
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 27
- PR merge metrics
- No merged PRs in 30d
Description
### Hello
Whole of the Editorjs creates output as raw JSON and no inline HTML is present. This helps in preventing XSS attacks. But with underline, the output text has inline HTML (sample below).
```
{
"time": 1735526737550,
"blocks": [
{
"id": "z5t-4fWC6H",
"type": "paragraph",
"data": {
"text": "And I want to say that this is not fine to work with."
}
}
],
"version": "2.30.7"
}
```
Can we create output like below?
```
{
"time": 1735526737550,
"blocks": [
{
"id": "z5t-4fWC6H",
"type": "paragraph",
"data": {
"items": [
{
"id": "7-djd",
"style": null,
"text": "And I want to say that"
},
{
"id": "8-djd",
"style": underline,
"text": " this is not fine "
},
{
"id": "9-djd",
"style": null,
"text": "to work with."
},
]
}
}
],
"version": "2.30.7"
}
```
This will help in preventing the XSS attacks.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.