1.0.20 • Published 4 years ago
grapesjs-preset-newsletter-v2 v1.0.20
GrapesJS Newsletter Preset
This preset configures GrapesJS to be used as a Newsletter Builder with some unique features and blocks composed specifically for being rendered correctly inside all major email clients.
Demo: http://grapesjs.com/demo-newsletter-editor.html
Summary
- Commands
gjs-get-inlined-htmlGet html with inlined CSSgjs-open-import-templateOpens a modal for the importgjs-toggle-imagesEnable/Disable images
- Blocks
sect100A section with 1 100% cell insidesect50A section with 2 50% cells insidesect30A section with 3 33.3333% cells insidesect37A section with 2 cells inside: 30% and 70%buttonSimple buttondividerDivider blocktextSimple text componenttext-sectA block with 2 text components, respectively for the heading and paragraphimageSimple image componentquoteText component for quotesgrid-itemsBlock of 2 components in rowlist-itemsList of 2 components
- Plugin
- Name:
gjs-preset-newsletter - Options:
modalTitleImportTitle for the import modal, default: 'Import template'modalLabelImportLabel for the import modal, default: ''modalLabelExportLabel for the export modal, default: ''modalBtnImportLabel for the import button, default: 'Import'importPlaceholderTemplate as a placeholder inside import modal, default: ''inlineCssIftrue, inlines CSS on export, default:truecellStyleDefault style used inside blockstds, default:{ padding: 0, margin: 0, 'vertical-align': 'top' }tableStyleDefault style used for blocks tables, default:{ height: '150px', margin: '0 auto 10px auto', padding: '5px 5px 5px 5px', width: '100%' }
- Name:
Usage
$ npm i grapesjs-preset-newsletter-v2import grapesjs from "grapesjs";
import newsLetter from "grapesjs-preset-newsletter-v2";
grapesjs.plugins.add("gjs-preset-newsletter", newsLetter);
const editor = grapesjs.init({
container: "#editor",
plugins: ["gjs-preset-newsletter"],
pluginsOpts: {
"gjs-preset-newsletter": {
inlineCss: false,
},
},
});Development
Clone the repository
$ git clone https://github.com/artf/grapesjs-preset-newsletter-v2.git
$ cd grapesjs-preset-newsletter-v2
$ npm i
$ npm link
$ npm run devIn main project:
$ npm link grapesjs-preset-newsletter-v2License
BSD 3-Clause
1.0.20
4 years ago
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.1
4 years ago