artemartemov / sanity-plugin-inline-svg-upload-preview Goto Github PK
View Code? Open in Web Editor NEWSanity.io studio plugin to upload and display inline SVGs
License: MIT License
Sanity.io studio plugin to upload and display inline SVGs
License: MIT License
Howdy,
I've run into a potential bug with the SVG Uploader after the last couple of Sanity Studio updates where the Upload SVG button is no longer clickable. Previously uploaded SVGs can still be removed, but once gone you can't upload a new one.
I have not been able to track down the source of the issue (which may be beyond my capabilities) but I was able to create a hack with CSS to show the default browser Choose File button and make use of this plugin with that method.
Is anyone else experiencing this issue with the latest Sanity updates? @artemartemov
I'm attempting to use this type multiple times in a single document.
eg:
...,
{
name: "svgTop",
title: "Top Image",
type: "svgUploadPreview",
description: "Used on the index page - displayed at the top",
validation: (Rule) => Rule.required(),
},
{
name: "svgBottom",
title: "Bottom Image",
type: "svgUploadPreview",
description: "Used on the index page - displayed at the bottom",
validation: (Rule) => Rule.required(),
},
{
name: "svgCombined",
title: "Combined Image",
type: "svgUploadPreview",
description: "Used as the header on non-index pages and within the menu.",
validation: (Rule) => Rule.required(),
},
...
It seems this causes an issue as all inputs have the same HTML name / id attribute svg-upload
.
I'd be happy to open a PR but it seems like the easy fix might be replace svg-upload
here with this.props.name
and the htmlFor
attribute on line 54.
Thanks for your work on this.
Hey! Thanks for this plugin but now it's not compatible with the latest Sanity Studio.
We are interested in having this plugin in our project so we'd be happy to step in and develop the next version
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.