Issue #565💬 AnsweredOpened November 23, 2017by paulroberttaylor-zz0 reactions

Custom html elements

Quick answerby artf

Yeah you can use different tag names in your custom component

Read full answer below ↓

Question

Is it possible, and if so how to do it, to use a custom html element e.g.

<body> <my-custom-tag/> </body>

Which will render specific html for the preview window, but the source will output the custom tag?

Thanks, Paul

Answers (3)

artfNovember 23, 2017

Yeah you can use different tag names in your custom component

paulroberttaylor-zzNovember 24, 2017

Thanks @artf, that points me in the right direction.

If I want the anything that needs to be editable in the block to appear in the custom tag code, how would I achieve that?

artfNovember 24, 2017

You mean something like this?

editor.BlockManager.add('custom-block', {
     label: 'Custom Block'
     content: '<custom-tag>...</custom-tag>',
})

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.