codex-team / codex-team/editor.js

[Bug] When doing a block conversion, it strips all formatting

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

Description

When I convert a paragraph to a header, for example, it strips all html tags.. including ones that should be saved by sanitize. Bold, italics, underline, links, and any other expected HTML gets stripped. This happens across all conversions that I've tested.

Steps to reproduce:
1. Go to [editorjs.io](url)
2. Select any paragraph block that has alternative formatting (inline code, marker, links, etc)
3. Convert it to a heading or quote, using the option available within the inline toolbar (on the left). You'll notice that all html tags are stripped and links, etc are lost.

Expected behavior: html tags should be preserved and interpreted by the rules defined in the Tool Class it is transforming into. Perhaps ideally, it runs through the onPaste and/or Sanitize functions... rather than stripping all html.

Screenshots: easy to reproduce on [editorjs.io](url)

Device, Browser, OS: Macbook Pro, Mac OS 11.7, Chrome Version 108.0.5359.124 (Official Build) (x86_64)

Editor.js version: @latest as of 12/22/22

Plugins you use with their versions: Easily reproducable on editorjs.io

Thank you!!

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.