Issue #877Opened February 16, 2018by eddyjl0770 reactions

Liquid integration

Question

Would it be possible to include Liquid syntax highlight in the HTML?

Answers (3)

maxtaccoFebruary 16, 20180 reactions

Hi, if you are talking about HTML displayed when exporting a template then unfortunately there is no way to customize it using the default export template command: https://github.com/artf/grapesjs/blob/dev/src/commands/view/ExportTemplate.js. You can see that CodeMirror's theme is hardcoded to 'hopscotch' in there. But, you can create your own export template command and override the default one and pass desired theme to it in options. You can find example of this in the grapesjs-presetnewsletter project: https://github.com/artf/grapesjs-preset-newsletter/blob/master/src/openExportCommand.js. Then just include custom CodeMirror theme css and it should work.

maxtaccoFebruary 16, 20180 reactions

Sorry, you were talking about the actual language highlighting. I'm not 100% sure about that but probably you need to customize CodeMirror as well. So, I would still take a look at export tempalte command.

artfFebruary 27, 20180 reactions

@eddyjl077 you can create a new command and initialize another codemirror instance with your options (eg. #209)

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...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.