kenvinlu / canva-editor

Canva Editor is a sleek design tool crafted with React, TypeScript, and Vite. Empower your creativity with a fast, intuitive, and versatile design experience.
https://www.canvaclone.com
25 stars 8 forks source link

Adding More Templates to Canva Editor #13

Open Dushyant-Khoda opened 4 months ago

Dushyant-Khoda commented 4 months ago

Hello Canva Editor Team,

I've been using your npm package for Canva Editor, and I'm really impressed with its functionality so far. However, I'm interested in extending it by adding more templates. I noticed that the current templates are stored as JSON data, but I'm unsure about the process of adding new templates or how to convert template data into the required format.

Questions:

Could you provide some guidance on how I can add more templates to Canva Editor using the npm package? What is the process for converting template data into the JSON format required by Canva Editor? Are there any specific guidelines or best practices I should follow when adding new templates? Additional Context: I've explored the package documentation and codebase, but I couldn't find detailed instructions on extending the template library. Any help or pointers you can provide would be greatly appreciated.

Thank you for your time and assistance!

kenvinlu commented 4 months ago

Hello @Dushyant-Khoda,

To create new template, open the DevTools > Console tab to copy the template data from the console log. Screenshot 2024-05-10 at 11 36 28

Next, go to the API source code > templates.json file and use the copied data to create a new object from the template list.

Screenshot 2024-05-10 at 11 39 06

I appreciate your interest!

kenvinlu commented 4 months ago

Additionally, you can stringify and minify the object using an online tool such as https://onlinejsontools.com/stringify-json.

Dushyant-Khoda commented 4 months ago

@kenvinlu  Thanks for the quick reply! I'm excited about discovering what Canva has to offer. I wanted to share this cool trick with you: did you realise that uploading.psd files to Canva is easy? That implies those beautiful designs can be converted into Canva-editor files with ease! I would love to use the wonderful collection of templates I have now for our project. I'd like to know if there's a method to include our customised Photoshop and Illustrator templates into our Canva project without having to start from scratch. Any advice or thoughts would be highly appreciated!