You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an editor with initial content, or when pasting content using clipboard.dangerouslyPasteHTML, at least text-align (e.g. <p style="text-align: right">right</p>) is ignored if the editor is using classes for alignment (the default). I presume this is a bug?
attr is {attrName: "align", keyName: "text-align", ... } while name is text-align. Should it perhaps be checking for attr.keyName instead? At least it seems to work for me.
if(attr!=null&&attr.attrKey===name){
The text was updated successfully, but these errors were encountered:
When creating an editor with initial content, or when pasting content using
clipboard.dangerouslyPasteHTML
, at leasttext-align
(e.g.<p style="text-align: right">right</p>
) is ignored if the editor is using classes for alignment (the default). I presume this is a bug?Codepen example: https://codepen.io/nik10110/pen/rpeMGp
Perhaps related: #1580
Steps for Reproduction
Expected behavior:
Convert
text-align: right
toql-align-right
.Actual behavior:
text-align: right
is ignored.Platforms:
Chromium Version 62.0.3202.94, Linux
Version:
Quill 1.3.4
Potential solution
Looking at modules/clipboard.js, function
matchAttributor(node, delta)
line 233:attr
is{attrName: "align", keyName: "text-align", ... }
whilename
istext-align
. Should it perhaps be checking forattr.keyName
instead? At least it seems to work for me.The text was updated successfully, but these errors were encountered: