editor-js / list

Advanced List tool for the Editor.js.
MIT License
48 stars 47 forks source link

Paste not working because of sanitize #46

Open medzhidov opened 1 year ago

medzhidov commented 1 year ago

Just add this:

static get sanitize() {
        return {
            ol: {},
            ul: {},
            li: {}
        };
    }
talyguryn commented 1 year ago

cannot reproduce a problem in the main branch. pasting works correctly.

please add more information.

medzhidov commented 1 year ago

@talyguryn I use it in "next" branch

talyguryn commented 1 year ago

in the next branch I still don't see any problems

image

notaloop0000 commented 1 year ago

It occurs to my application too. Content of tag a, code, b are removed after pasted. Replacing with an inherited class as suggested above does NOT fix. I use version v2.26.5.

export class EnhancedNestedListTool extends NestedListTool {
  static get sanitize(){
    return {
      a: {},
      b: {},
      code: {},
      i: {},
    }
  }
}