-
Notifications
You must be signed in to change notification settings - Fork 6
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
Request for a couple of minor feature additions #27
Comments
Hi, thanks for the feedback. The alt is first as it's really an attribute that should be set for all images (SEO and screen readers). Title is only there for images that want a caption. The order of alt/title doesn't need a code change, you can just add the following to your css to achieve the same: div[data-blot-formatter-modal] form {
display: grid;
}
div[data-blot-formatter-modal] form>label[for="alt"],
div[data-blot-formatter-modal] form>textarea[name="alt"],
div[data-blot-formatter-modal] form>div {
order: 1;
} Alternatively, if you don't want the alt at all, just set the label and textarea for alt to The 'T' icon is just a standard icon for text - can be anything you prefer. You can set the svg string for {
toolbar: {
icons: {
attribute: `
<svg viewBox="0 0 24 24" fill="none" class="ql-stroke">
<path d="M10 19H12M12 19H14M12 19V5M12 5H6V6M12 5H18V6" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`
}
}
} In fact, it doesn't need to be an svg - any valid/suitable text or html will do as this just becomes the innerHTML for the button: this.element.innerHTML = this.icon; I'll add an additional The '%' toggles the size mode between absolute (px) and relative (%) sizing to allow for responsive sizing. The image needs a width attribute before this is applied (to prevent accidentally introducing the width/height attributes by clicking this on and off again). If you have resizing turned off then this would only be useful for pasted images with those attributes already. I wouldn't add the default click option however as the interface is a full screen modal - I think it needs to be a deliberate action to reach that rather than just clicking on the image. Modals have a generally have a negative UX when they're not expected. When the blotformatter is activated, clicking on the image also displays the size information, so it's a bit confusing for the user to have two different responses to an image click. |
Thank you for this rather superb library. A bit of background (at the bottom) here slab/quill#4621
I'd like to request for a couple of minor feature additions:
Separately a bit of feedback:
Screenshots:
The text was updated successfully, but these errors were encountered: