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

Icon for code and code-block is the same #3165

Closed
mkozachok opened this issue Sep 6, 2020 · 4 comments
Closed

Icon for code and code-block is the same #3165

mkozachok opened this issue Sep 6, 2020 · 4 comments

Comments

@mkozachok
Copy link

I add 'code' and 'code-block' for the toolbar. In toolbar shows two the same icon, but the action is different.

Steps for Reproduction

  1. Visit https://codepen.io/mkozachok/pen/XWdVRXP
  2. See the same icons

Expected behavior:
Icons should be different.

Actual behavior:
Icons should the same.

Version:
latest

@OssiPesonen
Copy link

OssiPesonen commented Nov 24, 2020

Someone suggested a hack such as this to fix it:

const icons = Quill.import('ui/icons');
icons['code-block'] = '<svg viewbox="0 -2 15 18">\n' + '\t<polyline class="ql-even ql-stroke" points="2.48 2.48 1 3.96 2.48 5.45"/>\n' + '\t<polyline class="ql-even ql-stroke" points="8.41 2.48 9.9 3.96 8.41 5.45"/>\n' + '\t<line class="ql-stroke" x1="6.19" y1="1" x2="4.71" y2="6.93"/>\n' + '\t<polyline class="ql-stroke" points="12.84 3 14 3 14 13 2 13 2 8.43"/>\n' + '</svg>';

But this should be fixed in the source.

@singhAmandeep007
Copy link

Someone suggested a hack such as this to fix it:

const icons = Quill.import('ui/icons');
icons['code-block'] = '<svg viewbox="0 -2 15 18">\n' + '\t<polyline class="ql-even ql-stroke" points="2.48 2.48 1 3.96 2.48 5.45"/>\n' + '\t<polyline class="ql-even ql-stroke" points="8.41 2.48 9.9 3.96 8.41 5.45"/>\n' + '\t<line class="ql-stroke" x1="6.19" y1="1" x2="4.71" y2="6.93"/>\n' + '\t<polyline class="ql-stroke" points="12.84 3 14 3 14 13 2 13 2 8.43"/>\n' + '</svg>';

But this should be fixed in the source.

Indeed it fixed my issue , thanks for sharing.☺

@benbro
Copy link
Contributor

benbro commented Feb 20, 2024

Related #3917

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

5 participants