quill icon indicating copy to clipboard operation
quill copied to clipboard

Icon for code and code-block is the same

Open mkozachok opened this issue 4 years ago • 3 comments

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

mkozachok avatar Sep 06 '20 10:09 mkozachok

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.

OssiPesonen avatar Nov 24 '20 19:11 OssiPesonen

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.☺

singhAmandeep007 avatar Feb 14 '21 16:02 singhAmandeep007

Related https://github.com/quilljs/quill/pull/3917

benbro avatar Feb 20 '24 23:02 benbro

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 :pray:

quill-bot avatar Apr 17 '24 11:04 quill-bot