quill-delta-python icon indicating copy to clipboard operation
quill-delta-python copied to clipboard

Problem with var(--some-color)

Open schumskie opened this issue 5 years ago • 1 comments

This will break:

ops = [{'attributes': {'color': 'var(--powder-700)', 'link': 'https://stackoverflow.com/questions/tagged/html'}, 'insert': 'html'}]
html.render(ops)

When I copy pasted some random text from Stackoverflow, which included this link into quill editor (I think my future users will copy paste text from somewhere), application breaks. I think I'm doing things correctly please adjust me if I don't:

  1. I take content of Quill Editor with getContents() and send it as json.
  2. I store that json in db
  3. When user goes to page which is previously created I use html.render(json.loads(page.content)['ops']) Is there a way to ignore new/unsupported features when I call html.render so application won't break?

Thanks, Stefan

schumskie avatar Nov 10 '20 09:11 schumskie

any solution for this?

ghazanfarj avatar Apr 11 '23 18:04 ghazanfarj