editor.js icon indicating copy to clipboard operation
editor.js copied to clipboard

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

Open ARH3 opened this issue 2 years ago • 4 comments

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
  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

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!!

ARH3 avatar Dec 22 '22 07:12 ARH3