Skip to content

onPasteHTML config option - #2283

Closed
gkovats wants to merge 2 commits into
codex-team:nextfrom
gkovats:feature/onpastehtml
Closed

onPasteHTML config option#2283
gkovats wants to merge 2 commits into
codex-team:nextfrom
gkovats:feature/onpastehtml

Conversation

@gkovats

@gkovats gkovats commented Feb 21, 2023

Copy link
Copy Markdown

We're using Editor.js (thank you, you know, for years of work) for an internal CMS update, and one problem we have is a user base that constantly copies / pastes from MS Word. HTML from Word paste is ungodly, and needs some intelligence. One main issue is bullets are rendered as <p> tags without wrapping <ul> tags, but others arise. HTML Janitor / sanitize does the job it's expected, but we find the need to adjust the html before it gets to that step.

Tossing this up as a possible hook / extension for others. Understand there's not much in config event hooks, perhaps that's intended. We're fine working off a branch, just sending back for consideration.

@gkovats gkovats closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant