Issue #855πŸ’¬ AnsweredOpened Feb 9, 2018by kewilson2 reactions

No spacing with new button in export window

Quick answerby ryandeba❀ 1

Hi @kewilson, If I'm understanding your issue correctly, I bet setting the left margin instead of left padding would work a lot better...is this screenshot close to what you're trying to accomplish? If so, you could replace your button.style.paddingLeft = "30px" code with button.style.marginLeft = "10px". Or you could...

Read full answer below ↓

Question

I've implemented a new plugin that adds another button in the export window, it's working fine. However when the page displays there isn't a space between it and the existing "Export ZIP" button.

How might I go about adding a space the grapesjs way? Is it just figuring out which html dom element properties to tweak? .. e.g., https://www.w3schools.com/jsref/dom_obj_all.asp

Answers (3)

ryandebaβ€’ Feb 10, 2018

Hi @kewilson, If I'm understanding your issue correctly, I bet setting the left margin instead of left padding would work a lot better...is this screenshot close to what you're trying to accomplish? If so, you could replace your button.style.paddingLeft = "30px" code with button.style.marginLeft =...

ryandebaβ€’ Feb 10, 2018

Hi @kewilson, This is a bit difficult to work with without a live code example (like a jsfiddle demo), but I'm seeing a few issues:let buttons = editor.Modal.getElementsByTagName("button") || {};This is probably throwing an error since editor.Modal is not a dom element, so getElementsByTagName is n...

kewilsonβ€’ Feb 9, 2018

ok so button.style.paddingLeft = "30px"; works but I've noticed that the border area where the buttons reside don't distinguish between the two .. i.e., no button border around each button's text. Because the Export ZIP button is not under our control how might we go about adding a button border ar...

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.