+ GJS Plugin; Issues using the data-tab attribute
Hi @Moikapy, can you provide a minimal live demo of the issue, please?
Read full answer below βQuestion
Hello had an issue using the data-tab attribute with my elements.
We were creating a tab that made use of the attribute allowing it to swap between the contents, and when rendered onto the page the data-tab attributes are changed from their original value to a 1. This change then returns an error saying that this isn't the correct selector.
Will post more information as it is found/requested.
Answers (3)
Hi @Moikapy, can you provide a minimal live demo of the issue, please?
Example Video: https://youtu.be/0cD3fzWdnHk
Another thing I'm trying to figure out is how to keep GrapesJS from stripping the data-gjs-type attributes as well wen using the setComponent Function.
You're using incorrectly the template. You should place attributes like data-tab and data-tab-container without assigning any value, those are used internally by JS to understand where pieces are placed
<nav data-tab-container>
<a href="#tab1" data-tab>Tab 1</a>
<a href="#tab2" data-tab>Tab 2</a>
<a href="#tab3" data-tab>Tab 3</a>
</nav>
Related Questions and Answers
Continue research with similar issue discussions.
Issue #518
change only component body not whole page body.
Hello @artf As we discussed in issue #374. setComponents will set the body and replace all the contents that are present on the page with a...
Issue #1272
[QUESTION] Using setComponent() ??
Creating a Plugin to use GrapesJS with Plone. GrapesJS Version: Latest When using the setComponent() function, we are scraping the HTML con...
Issue #1682
Remove cookies on GrapesJS?
Hello! I'm using the latest version of GrapesJS, however it is causing issues with my project, because GrapesJS is saving the edits as a co...
Issue #689
Change value of attribute that is passed through traits
Hello @artf Is there any methods to manipulate the input value of an attribute that is passed through traits. Like I passed value Hello in...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.