Skip to main content

Required to use fileReader inside code.js

  • December 29, 2023
  • 2 replies
  • 264 views

Figma12

I am new to Figma plugin development. I want to read the HTML file using filereader instead the code.js.

I have installed the filereader using npm. now I am facing below error while using require to import the package. As I came to know the require is not supporting in Figma.

Kindly suggest the possible way to import the filereader package.

2 replies

Gayani_S
Figmate
  • Community Support
  • December 29, 2023

Hey there, I’ve changed the category to “Share an Idea”. You can vote for your feature request.


Gleb
  • Power Member
  • December 29, 2023

You should be able to use this API in the plugin UI. Have you tried? You don’t need to install any npm packages.

MDN Web Docs