Skip to content

Commit

Permalink
Feature/renaming (editor-js#9)
Browse files Browse the repository at this point in the history
* Rename all occurences

* 2.2.0

* Update packages

* Fix dev command

* Fix bundle

* Fix test dependencies and imports

* Rename repo

* Create .npmignore

* Update README.md
  • Loading branch information
gohabereg authored Mar 2, 2019
1 parent 0cc7128 commit a99abc4
Show file tree
Hide file tree
Showing 11 changed files with 1,337 additions and 6,362 deletions.
8 changes: 8 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea/
docs/
src/
test/
.babelrc
webpack.config.js
yarn.lock
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
![](https://badgen.net/badge/CodeX%20Editor/v2.0/blue)
![](https://badgen.net/badge/Editor.js/v2.0/blue)

# Embed Tool

Provides Block tool for embedded content for the [CodeX Editor](https://ifmo.su/editor).
Tool uses CodeX Editor pasted patterns handling and inserts iframe with embedded content.
Provides Block tool for embedded content for the [Editor.js](https://editorjs.io).
Tool uses Editor.js pasted patterns handling and inserts iframe with embedded content.

## Installation

Expand All @@ -12,13 +12,13 @@ Tool uses CodeX Editor pasted patterns handling and inserts iframe with embedded
Get the package

```shell
npm i --save-dev codex.editor.embed
npm i --save-dev @editorjs/embed
```

Include module at your application

```javascript
const Embed = require('codex.editor.embed');
const Embed = require('@editorjs/embed');
```

### Download to your project's source dir
Expand All @@ -27,22 +27,22 @@ const Embed = require('codex.editor.embed');
2. Add `dist/bundle.js` file to your page.

### Load from CDN
You can load specific version of package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/codex.editor.embed).
You can load specific version of package from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@editorjs/embed).

`https://cdn.jsdelivr.net/npm/codex.editor.embed@2.0.0`
`https://cdn.jsdelivr.net/npm/@editorjs/embed@2.0.0`

Then require this script on page with CodeX Editor.
Then require this script on page with Editor.js.

```html
<script src="..."></script>
```

## Usage

Add a new Tool to the `tools` property of the CodeX Editor initial config.
Add a new Tool to the `tools` property of the Editor.js initial config.

```javascript
var editor = CodexEditor({
var editor = EditorJS({
...

tools: {
Expand All @@ -59,7 +59,7 @@ var editor = CodexEditor({
Embed Tool supports some services by default (see the full list [here](docs/services.md)). You can specify services you would like to use:

```javascript
var editor = CodexEditor({
var editor = EditorJS({
...

tools: {
Expand Down Expand Up @@ -111,7 +111,7 @@ Example:
When you create a Service configuration object, you can provide it with Tool\`s configuration:

```javascript
var editor = CodexEditor({
var editor = EditorJS({
...

tools: {
Expand Down Expand Up @@ -140,10 +140,10 @@ var editor = CodexEditor({
```

#### Inline Toolbar
CodeX Editor provides useful inline toolbar. You can allow it\`s usage in the Embed Tool caption by providing `inlineToolbar: true`.
Editor.js provides useful inline toolbar. You can allow it\`s usage in the Embed Tool caption by providing `inlineToolbar: true`.

```javascript
var editor = CodexEditor({
var editor = EditorJS({
...

tools: {
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit a99abc4

Please sign in to comment.