font-picker icon indicating copy to clipboard operation
font-picker copied to clipboard

Uncaught TypeError: Cannot read property 'pickerId' of undefined

Open ivg-design opened this issue 3 years ago • 2 comments

Hi, so i am using the font-picker via JSDelivr CDN and i have followed all the instructions, i have a div with "font-picker" id, but I keep getting an error on the page- Screen Shot 2021-04-22 at 08 24 13

I am not sure what it is that I am doing wrong...

ivg-design avatar Apr 22 '21 12:04 ivg-design

I know this is a bit of an old post at this point, but I came across the same problem recently when I was trying to use the JSDelivr CDN too and I think that it has a bugged or older version of the script somehow. So I'd download and self-host if you could and if you're unsure how to compile everything I'd recommend using the compiled 3.5.1 script in ogallagher's post here. I can personally confirm that the dist-browser variant works beautifully and solved the errors that I was getting with the JSDelivr CDN. Hope that helps!

H3K83 avatar Aug 10 '21 15:08 H3K83

You need to enable Web Fonts Developer API.

  1. Go to https://console.developers.google.com/projectselector/apis/credentials
  2. Select a project or start a new project
  3. On the left side of the screen go to ‘Credentials’ tab and choose ‘API key’, then choose ‘Browser key’, give it a name and press ‘Create’.
  4. Copy the given API key
  5. From the left side of the screen go to ‘Overview’, in the ‘Other popular APIs’ section choose the ‘Web Fonts Developer API’.
  6. Press ‘Enable API’.

shinokada avatar Dec 22 '21 04:12 shinokada