Skip to content

Problem with var(--some-color) #11

@schumskie

Description

@schumskie

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions