@ -18,9 +17,9 @@ GrapesJS is a free and open source Web Builder Framework which helps building HT
Generally any 'template system', that you'd find in various applications like CMS, is composed by the **structure** (HTML), **style** (CSS) and **variables**, which are then replaced with other templates and contents on server-side and rendered on client.
This demos show examples of what is possible to achieve:
@ -99,41 +98,23 @@ For the development purpose you should follow instructions below.
</script>
```
You could also grab the content directly from the element with `fromElement` property
```html
<divid="gjs">
<divclass="txt-red">Hello world!</div>
<style>.txt-red{color:red}</style>
</div>
<scripttype="text/javascript">
var editor = grapesjs.init({
container : '#gjs',
fromElement: true,
});
</script>
```
For more practical example I suggest to look up the code inside this demo: http://grapesjs.com/demo.html
For a more practical example I'd suggest looking up the code inside this demo: http://grapesjs.com/demo.html
## Development
GrapesJS uses [Webpack](https://github.com/webpack/webpack) as a module bundler and [Babel](https://github.com/babel/babel) as a compiler.
Clone the repository and install all the necessary dependencies
Clone the repository and install all the necessary dependencies (`yarn` is highly recommended)
```sh
$ git clone https://github.com/artf/grapesjs.git
$ cd grapesjs
$ npm i
$ yarn
```
Start the dev server
```sh
$ npm start
$ yarn start
```
Once the development server is started you should be able to reach the demo page (eg. `http://localhost:8080`)
@ -161,7 +142,7 @@ API References could be found here: [API-Reference]
## Testing
```sh
$ npm test
$ yarn test
```
@ -208,35 +189,13 @@ Find out more about plugins here: [Creating plugins](https://grapesjs.com/docs/m
## Support
If you like the project support it with a donation of your choice or become a backer/sponsor via [Open Collective](https://opencollective.com/grapesjs)
If you like the project and you wish to see it grow, please consider supporting us with a donation of your choice or become a backer/sponsor via [Open Collective](https://opencollective.com/grapesjs)