Issue #1248šŸ’¬ AnsweredOpened June 29, 2018by ronaldaug1 reactions

Appending a button inside the default (code view) modal.

Quick answerby ronaldaugā¤ 1

I got it by listening this command run:export-template.

Read full answer below ↓

Question

This is not actually an issue. I would like to add a button inside the original code view modal, it's like zip download button that @artf added inside this plugin. Instead of modifying gjs export plugin, Is there any API option that I can achieve it in a few lines. Probably, something like this.. It could be done by cloning a new code mirror as below. But there will be two code editors inside GJS editor and I think it's a bit more work for just a single button. var codeViewer = editor.CodeManager.getViewer('CodeMirror').clone();

Answers (2)

ronaldaug• June 30, 2018

I got it by listening this command run:export-template.

editor.on('run:export-template', () => {
        editor.Modal.getContentEl().appendChild(myBtn);
})
lock[bot]• September 17, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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.