Issue #407πŸ’¬ AnsweredOpened October 11, 2017by ateshuseyin0 reactions

Defining new markup language

Quick answerby gasserol

Did you see that there is a preset from the author of this project for mjml, maybe this helps you? https://github.com/artf/grapesjs-mjml

Read full answer below ↓

Question

Hi @artf, I want to define a new markup language like mjml to make design more easy and readable. I started with <error>tag as a POC. Write code below; model: import Component from 'grapesjs/src/domcomponents/model/Component'; const ComponentError = Component.extend({ defaults: { type: 'error', tagName: 'error', ...Component.prototype.defaults }, }, { /*Detect if the passed element is a valid component.In case the element is valid an object abstractedfrom the element will be returned@param {HTMLElement}@return {Object}@private / isComponent(el) { var result = ''; if (el.tagName == 'ERROR') {...

Answers (3)

gasserolβ€’ October 11, 2017

Did you see that there is a preset from the author of this project for mjml, maybe this helps you? https://github.com/artf/grapesjs-mjml

ateshuseyinβ€’ October 11, 2017

Thanks @gasserol. I saw but I could not find the problem.

ateshuseyinβ€’ October 11, 2017

Now works on drop :) But still cannot parse from element.

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.