Issue #2690✓ SolvedOpened Mar 31, 2020by adamwpe12 reactions

Custom Component disappear on Save (Vue.js)

Quick answerby adamwpe8

@pouyamiralayi Thanks for that, pointed me in the right direction - so he is an example that works for me for rending a Vue Component and it will load back in :), but sure may be useful for someone else: Thanks for the help everyone!

Read full answer below ↓

Question

Hi All, I'm trying to test adding some custom Vue.js components to the block manager, and at first appearance, all is well - it renders correctly and vue components are responsive. But if I save the template, and reload my page, and supply the storageManager with 'gjs-style', 'gjs-components', 'gjs-html', 'gjs-css'. The custom component no longer renders. It appears the the storageManager removes any script tags???? As if I check my REST GET request, 'gjs-html' does contain the <script> tag. Before Saving: After Reloading Loading: Not too sure something is wrong with my component: editor.Bloc...

Answers (3)

👍 Most helpfuladamwpeApr 2, 2020

@pouyamiralayi Thanks for that, pointed me in the right direction - so he is an example that works for me for rending a Vue Component and it will load back in :), but sure may be useful for someone else: Thanks for the help everyone!

mcottretApr 1, 2020

Hi @adamwpe ! Script tag importing is disabled by the default editor configuration, which explains why your scripts tags are stripped out by the HTML Parser, setting the allowScripts editor configuration option to true should solve the issue, eg: Hope this helps :)

pouyamiralayiApr 2, 2020

@adamwpe we had something like this in the past i apologize for not seeing it through! go like this: there is no need to extend from dView & dModel in the latest versions. and for the vue js integration please notice that the internal structure of your vue component would not be detected by grapesj...

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 →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.