Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
docs: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
SofiaSousa committed Nov 16, 2018
1 parent 46f88f1 commit 984c725
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We made [Gutenberg](https://github.com/Wordpress/gutenberg) editor a little more

Gutenberg editor can **be easly included in your apps** with this [package](https://github.com/front/gutenberg-js).

This package is based on [Gutenberg v4.2.0](https://github.com/WordPress/gutenberg/releases/tag/v4.2.0) and respective @wordpress packages versions.
This package is based on [Gutenberg v4.4.0](https://github.com/WordPress/gutenberg/releases/tag/v4.4.0) and respective @wordpress packages versions.

## Table of contents

Expand Down Expand Up @@ -285,8 +285,8 @@ We've tried to make it easy to import **gutenberg-js** modules to your apps.
// Importing global variables that Gutenberg requires
import './globals';

// Importing editPost module
import { editPost } from '@frontkom/gutenberg-js';
// Importing domReady and editPost modules
import { domReady, editPost } from '@frontkom/gutenberg-js';

// Don't forget to import the style
import '@frontkom/gutenberg-js/build/css/block-library/style.css';
Expand Down Expand Up @@ -327,7 +327,11 @@ const settings = {
const overridePost = {};

// Et voilá... Initializing the editor!
editPost.initializeEditor(target, postType, postId, settings, overridePost);
window._wpLoadGutenbergEditor = new Promise(function (resolve) {
domReady(function () {
resolve(editPost.initializeEditor(target, postType, postId, settings, overridePost));
});
});
```

**Note**: Gutenberg requires utf-8 encoding, so don't forget to add `<meta charset="utf-8">` tag to your html `<head>`.
Expand Down

0 comments on commit 984c725

Please sign in to comment.