https://github.com/grapesjs/parser-postcss
Custom CSS parser for GrapesJS by using PostCSS
https://github.com/grapesjs/parser-postcss
Last synced: 4 months ago
JSON representation
Custom CSS parser for GrapesJS by using PostCSS
- Host: GitHub
- URL: https://github.com/grapesjs/parser-postcss
- Owner: GrapesJS
- License: bsd-3-clause
- Created: 2018-09-20T20:36:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-10-07T14:00:45.000Z (over 2 years ago)
- Last Synced: 2024-12-16T02:12:03.330Z (over 1 year ago)
- Language: TypeScript
- Size: 804 KB
- Stars: 30
- Watchers: 4
- Forks: 24
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GrapesJS Parser PostCSS
This plugin enables custom CSS parser via [PostCSS](https://github.com/postcss/postcss). If you import templates from HTML/CSS or embed custom codes (eg. by using [grapesjs-custom-code](https://github.com/GrapesJS/components-custom-code) plugin) you definitely need to use this one to avoid issues with styles, [check here why](http://grapesjs.com/docs/guides/Custom-CSS-parser.html#cssom-results-are-inconsistent).
> Requires GrapesJS v0.14.33 or higher
## Summary
* Plugin name: `grapesjs-parser-postcss`
## Options
This plugin has no options
## Download
* CDN
* `https://unpkg.com/grapesjs-parser-postcss`
* NPM
* `npm i grapesjs-parser-postcss`
* GIT
* `git clone https://github.com/GrapesJS/parser-postcss.git`
## Usage
Directly in the browser
```html
var editor = grapesjs.init({
container : '#gjs',
// ...
plugins: ['grapesjs-parser-postcss'],
});
```
Modern javascript
```js
import grapesjs from 'grapesjs';
import parserPostCSS from 'grapesjs-parser-postcss';
const editor = grapesjs.init({
container : '#gjs',
// ...
plugins: [parserPostCSS],
});
```
## Development
Clone the repository
```sh
$ git clone https://github.com/GrapesJS/parser-postcss.git
$ cd grapesjs-parser-postcss
```
Install dependencies
```sh
$ npm i
```
Start the dev server
```sh
$ npm start
```
## License
BSD 3-Clause