Skip to content

Commit

Permalink
doc: ドキュメントの更新
Browse files Browse the repository at this point in the history
  • Loading branch information
uidev1116 committed Jul 18, 2024
1 parent 7a4b707 commit 05c7f52
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 116 deletions.
2 changes: 1 addition & 1 deletion gatsby/content/blog/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "Installation"
### Use CDN

```html
<script src="https://unpkg.com/smartblock@latest/dist/umd/standalone/index.js"></script>
<script src="https://unpkg.com/smartblock@latest/dist/standalone/index.js"></script>
```

### Install From npm
Expand Down
22 changes: 11 additions & 11 deletions gatsby/content/blog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install smartblock --save
### Load JavaScript from CDN

```html
<script src="https://unpkg.com/smartblock@1.3.1/dist/smartblock.js"></script>
<script src="https://unpkg.com/smartblock@latest/dist/standalone/index.js"></script>
```

## Usage
Expand All @@ -29,27 +29,27 @@ $ npm install smartblock --save
In your JavaScript file:

```jsx
import * as React from 'react';
import { render } from 'react-dom';
import * as React from 'react';
import { render } from 'react-dom';
import 'smartblock/css/smartblock.css';
import { SmartBlock, Extensions } from 'smartblock';
import { SmartBlock, Extensions } from 'smartblock';

render(<>
<SmartBlock
extensions={Extensions}
html={'<h2>Hello World</h2><p>hello</p>'}
onChange={({ json, html }) => { console.log(json, html);}}
/>
html={'<h2>Hello World</h2><p>hello</p>'}
onChange={({ json, html }) => { console.log(json, html);}}
/>
</>, document.getElementById("app")
);
```

### As an Native JavaScript

```html
<link rel="stylesheet" href="https://unpkg.com/smartblock@1.3.2/css/smartblock.css" />
<script src="https://unpkg.com/smartblock@1.3.2/dist/editor.js"></script>
<script src="https://unpkg.com/smartblock@1.3.2/dist/extensions.js"></script>
<link rel="stylesheet" href="https://unpkg.com/smartblock@latest/css/smartblock.css" />
<script src="https://unpkg.com/smartblock@latest/dist/standalone/index.js"></script>
<script src="https://unpkg.com/smartblock@latest/dist/standalone/extensions/index.js"></script>
<!-- You can use smartblock without using JSX -->
<!-- bundle size is much smaller than the package build with react !-->
<script>
Expand All @@ -67,4 +67,4 @@ SmartBlock.Editor('#app', {

### Compatibility

IE11, and Edge, iOS Safari, Firefox, Chrome, Safari
Edge, iOS Safari, Firefox, Chrome, Safari
151 changes: 77 additions & 74 deletions gatsby/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 05c7f52

Please sign in to comment.