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

Error when autocorrect replace a text with custom color #2144

Closed
ddemolina opened this issue Jun 7, 2018 · 3 comments
Closed

Error when autocorrect replace a text with custom color #2144

ddemolina opened this issue Jun 7, 2018 · 3 comments

Comments

@ddemolina
Copy link

When you use the autocorrect in chrome to fix a misspelling word wich has a custom color the word dissapear completely

Steps for Reproduction

  1. Visit quilljs.com in Chrome 67
  2. Switch to the third example
  3. Select a word
  4. Change the font color.
  5. Introduce a misspelling in this word
  6. Use contextual menu to choose a correction
  7. the word you selected dissapear

Expected behavior:

Replace the selected word with the one you choose in the contextual menu

Actual behavior:
The word selected dissapear
And get an error in create function:
throw new ParchmentError("Unable to create " + input + " blot");
Where input value is font.

Platforms:
Chrome Versión 67.0.3396.79 (Build oficial) (64 bits)
Windows 10
Version:
Tried in quill 1.3.6
In quill 1.2.2 the word doesn`t dissapear but loose the color

quill

@tleveque23
Copy link

+1 !

@benhowell
Copy link

benhowell commented Feb 13, 2019

Also occurs in Chrome on Linux.

Does not occur in this example: https://quilljs.com/playground/#class-vs-inline-style
An interim fix is to use your own color palette, e.g.

<span class="ql-formats">
    <select class="ql-color">
      <option value="red"></option>
      <option value="green"></option>
      <option value="blue"></option>
    </select>
...

Edit: further to this, it seems as if you can only use colors that are present in the css file (snow in my case).
All colors are:

.ql-editor .ql-color-white {
  color: #fff;
}
.ql-editor .ql-color-red {
  color: #e60000;
}
.ql-editor .ql-color-orange {
  color: #f90;
}
.ql-editor .ql-color-yellow {
  color: #ff0;
}
.ql-editor .ql-color-green {
  color: #008a00;
}
.ql-editor .ql-color-blue {
  color: #06c;
}
.ql-editor .ql-color-purple {
  color: #93f;
}

@luin
Copy link
Member

luin commented Jun 23, 2023

Fixed in #3807. Feel free to let me know if there is anything missing. Closing

@luin luin closed this as completed Jun 23, 2023
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

4 participants