Issue #2302πŸ’¬ AnsweredOpened September 30, 2019by Amitkumar855332 reactions

How to get the external plugin CSS, JS and HTML through GrapesJS export feature?

Quick answerby pouyamiralayi❀ 1

. But we are unable to show users the calendar on the canvas after drag and drop with render function in MODEL that is why we used OnRender in the VIEW. Did you try the component type definition i posted for you? it has been tested and it is working: So, is the MODEL alone sufficient to render as well as add HTML to e...

Read full answer below ↓

Question

I have used an external plugin javascript version of @fullCalendar into the GrapesJS. I am able to render the calendar on the canvas but I am unable to use GrapesJS export feature to get JS, CSS and HTML of the following. I tried using 1) var html = editor.getHtml(); 2) var css = editor.getCss(); 3) var js = editor.getJs(); 4) editor.on('component:mount', comp => console.log(comp.toHtml())); Calendar rendered on Canvas - Export of GrapesJs Editor - Kindly help me! Thanks in advance ...

Answers (3)

pouyamiralayiβ€’ October 1, 2019

. But we are unable to show users the calendar on the canvas after drag and drop with render function in MODEL that is why we used OnRender in the VIEW. Did you try the component type definition i posted for you? it has been tested and it is working: So, is the MODEL alone sufficient to render as w...

Amitkumar85533β€’ October 1, 2019

Thanks a lot, @pouyamiralayi. The code you gave was working. Our code was not able to pick the dom element to render the calendar. Now it is working as expected.

Thanks a lot for helping us out !!!! :-p

pouyamiralayiβ€’ September 30, 2019

Hi there! what you are looking for is using js inside components. just include the required js and css in the canvas scripts and styles section: after that build your own custom type component: then on code preview you will see the result script: cheers!

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.