Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
schumskie opened this issue Nov 10, 2020 · 1 comment
Open

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

schumskie opened this issue Nov 10, 2020 · 1 comment

Comments

@schumskie
Copy link

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

@ghazanfarj
Copy link

any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants