Skip to content

Commit b72edc9

Browse files
committed
Major release 1.0.0
1 parent 20378d5 commit b72edc9

File tree

10 files changed

+2784
-2908
lines changed

10 files changed

+2784
-2908
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Embed links with iframe.ly into your draft-js editor.
88
## Installation
99

1010
```
11-
npm install draft-js-iframely-plugin
11+
npm install @jimmycode/draft-js-iframely-plugin
1212
```
1313

1414
*Optional*
@@ -26,7 +26,7 @@ This plugin embeds URLs in different ways:
2626
3. Intregrating the Embed button with `draft-js-side-toolbar-plugin`.
2727

2828
```js
29-
import createIframelyPlugin from 'draft-js-iframely-plugin';
29+
import createIframelyPlugin from '@jimmycode/draft-js-iframely-plugin';
3030
const iframelyPlugin = createIframelyPlugin({
3131
options: {
3232
apiKey: 'my-api-key'
@@ -42,7 +42,7 @@ Pressing Enter will close and embed the URL; but, lose the focus on the editor,
4242
## Configuration
4343
| Param | Default | Description |
4444
|----------------|-------------------------------------|-------------------------------------------------------------------------|
45-
| theme | Default styles | draft-js-iframely-plugin/lib/plugin.css |
45+
| theme | Default styles | @jimmycode/draft-js-iframely-plugin/lib/plugin.css |
4646
| options | Default behavior | List of options. |
4747
| embedderType | 'draft-js-iframely-plugin-embedder' | Type of entity created when inserting the embedder block. |
4848
| embedType | 'draft-js-iframely-plugin-embed' | Type of entity created when embedding the URL. |
@@ -60,7 +60,7 @@ Pressing Enter will close and embed the URL; but, lose the focus on the editor,
6060
| onRequest | `return (await fetch(url)).json()` | Function to request the metadata of the URL. It will receive the URL to request and MUST return a JSON, contaning the key 'html'. |
6161

6262
## Theming
63-
The plugin ships with a default styling available at this location in the installed package: `node_modules/draft-js-image-plugin/lib/plugin.css`
63+
The plugin ships with a default styling available at this location in the installed package: `node_modules/@jimmycode/draft-js-iframely-plugin/lib/plugin.css`
6464

6565
*Webpack Usage*
6666
1. Install Webpack loaders: `npm i style-loader css-loader --save-dev`
@@ -85,7 +85,7 @@ module.exports = {
8585

8686

8787
```js
88-
import 'draft-js-iframely-plugin/lib/plugin.css';
88+
import '@jimmycode/draft-js-iframely-plugin/lib/plugin.css';
8989
```
9090

9191
## Example
@@ -99,9 +99,9 @@ import { EditorState } from 'draft-js';
9999
import createSideToolbarPlugin from 'draft-js-side-toolbar-plugin';
100100
import BlockTypeSelect from 'draft-js-side-toolbar-plugin/lib/components/BlockTypeSelect';
101101

102-
import createIframelyPlugin from 'draft-js-iframely-plugin';
102+
import createIframelyPlugin from '@jimmycode/draft-js-iframely-plugin';
103103
import 'draft-js-side-toolbar-plugin/lib/plugin.css';
104-
import 'draft-js-iframely-plugin/lib/plugin.css';
104+
import '@jimmycode/draft-js-iframely-plugin/lib/plugin.css';
105105

106106
const iframelyPlugin = createIframelyPlugin({
107107
options: {
@@ -145,10 +145,10 @@ class MyEditor extends React.Component {
145145
return (
146146
<div className="editor">
147147
<Editor
148-
editorState={this.state.editorState}
149-
onChange={this.onChange}
150-
plugins={this.plugins}
151-
placeholder="Tell a story" />
148+
editorState={this.state.editorState}
149+
onChange={this.onChange}
150+
plugins={this.plugins}
151+
placeholder="Tell a story" />
152152
<SideToolbar />
153153
</div>
154154
);
@@ -168,11 +168,11 @@ import { EditorState } from 'draft-js';
168168

169169
import createFocusPlugin from 'draft-js-focus-plugin';
170170
import createAlignmentPlugin from 'draft-js-alignment-plugin';
171-
import createIframelyPlugin from 'draft-js-iframely-plugin';
171+
import createIframelyPlugin from '@jimmycode/draft-js-iframely-plugin';
172172

173173
import 'draft-js-focus-plugin/lib/plugin.css';
174174
import 'draft-js-alignment-plugin/lib/plugin.css';
175-
import 'draft-js-iframely-plugin/lib/plugin.css';
175+
import '@jimmycode/draft-js-iframely-plugin/lib/plugin.css';
176176

177177
const focusPlugin = createFocusPlugin();
178178
const alignmentPlugin = createAlignmentPlugin();
@@ -212,10 +212,10 @@ class MyEditor extends React.Component {
212212
return (
213213
<div className="editor">
214214
<Editor
215-
editorState={this.state.editorState}
216-
onChange={this.onChange}
217-
plugins={this.plugins}
218-
placeholder="Tell a story" />
215+
editorState={this.state.editorState}
216+
onChange={this.onChange}
217+
plugins={this.plugins}
218+
placeholder="Tell a story" />
219219
<AlignmentTool />
220220
</div>
221221
);

0 commit comments

Comments
 (0)