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

CSS from custom format retained in violation of formats configuration #1421

Open
haugstrup opened this issue Apr 21, 2017 · 2 comments
Open

Comments

@haugstrup
Copy link
Contributor

Given a custom format that uses a custom HTML element, some styling will be retained from the custom format after deletion (but only in some cases).

Steps for Reproduction

  1. Visit: http://codepen.io/anon/pen/bWpoZQ
  2. Note that formats only contain our custom format and not e.g. background or bold
  3. Note that the custom format has CSS styles applied
  4. The editor has inserted our custom format and a space -- this could've been typed manually and marked up using a toolbar
  5. Select all text
  6. Type a single character

Expected behavior:
The editor should contain the single character and that character should not be formatted
OR
The editor should contain the single character and that character should be formatted using our custom format

Actual behavior:
The editor inserts the typed character, but some styling is retained from the custom format.

Retained formats: background, bold, italic and maybe more
Not retained: color

I shouldn't see background, bold, italic etc. applied because they are not whitelisted as approved formats in my Quill configuration.

Platforms:

Problem exists in at least Chrome, Firefox and Safari.

Version:

1.2.4

@jhchen
Copy link
Member

jhchen commented Apr 22, 2017

This is a bug but I will note the workaround in the meantime, which is using quill.core.js instead of quill.js. This is because the normal quill.js build still registers formats such as bold, and relies on another mechanism (formats config) to disallow it, whereas quill.core.js has no knowledge of bold at all.

@benbro
Copy link
Contributor

benbro commented Feb 3, 2024

Related to #3988?

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

No branches or pull requests

3 participants