Issue #3114Opened November 5, 2020by anushabivera0 reactions

How to customize View Code functionality in grapesjs-plugin-boilerplate?

Question

Code SnippetHTML
Hi 
I am using grapesjs-plugin-boilerplate to develop my grapesjs ui builder. My requirement is to customize the View Code (</>) feature in the ui builder to display the contents from editor.getHml() enclosed by html tag as below:

        <html>
            <head>
            </head>
            <body>
              ${editor.getHtml()}
            </body>
        </html>

I followed the solution mentioned in [#523](https://github.com/artf/grapesjs/issues/523) and https://developer.aliyun.com/mirror/npm/package/grapesjs-plugin-export. Both these solutions are wrt grapesjs-export-plugin. Also on implementing the solution mentioned in the above mentioned references I got the below error:

**ERROR** in Template execution failed: ReferenceError: editor is not defined

Any guidance on this issue would be of immense help

Thank you.

Answers (1)

artfNovember 9, 20200 reactions

ERROR in Template execution failed: ReferenceError: editor is not defined

Without showing your code the error is useless... definitely, you forgot something somewhere, try to debug...

BTW grapesjs-plugin-boilerplate is deprecated, you have to use grapesjs-cli

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.