From 6d095a0316191cdf3d67404717344b54bfa66833 Mon Sep 17 00:00:00 2001 From: Tom Medema Date: Fri, 9 Mar 2018 18:51:56 +0100 Subject: [PATCH] add baseCss overwrite documentation --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 553a16335..6819e5b49 100644 --- a/README.md +++ b/README.md @@ -123,8 +123,15 @@ You could also grab the content directly from the element with `fromElement` pro For more practical example I suggest to look up the code inside this demo: http://grapesjs.com/demo.html - - +By default Grapes injects base CSS into the canvas. For example, it sets body margin to 0 and sets a default background color of white. This CSS is desired in most cases. However, if you wish to disable or define your own base CSS, you can do so with the `baseCss` config parameter. This is useful if for example your template is not based off a document with 0 as body margin: + +```javascript +var editor = grapesjs.init({ + container : '#gjs', + fromElement: true, + baseCss: 'html, body { background-color: #ffffff; }' +}); +``` ## Development