codex-team / codex-team/editor.js

Nested tags onPaste

Open
#1,308 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

I'm trying to create insertable table, but found issue. Event not returned nested tags from table.
```
static get pasteConfig() {
return {
tags: [
"TABLE",
"TR",
"TD",
"TH",
"TBODY",
"THEAD",
]
}
}

onPaste(event) {
console.log(event.detail.data);
}
```
clipboardData(text/html, part of google sheet table):
```

<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest

```
log from `onPaste`
![image](https://user-images.githubusercontent.com/22794833/92897636-09e29400-f426-11ea-8c91-8c7bfcfee4f8.png)

Am I missed some config, to persist nested tags?

Chrome 85.0.4183.102
EditorJS 2.18.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.