Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #52 from draft-js-plugins/patch-example
Browse files Browse the repository at this point in the history
Update example's title and remove fontawesome in block-switcher-example
  • Loading branch information
juliankrispel authored Jan 10, 2019
2 parents 9fe4d48 + fb26695 commit 6e41163
Show file tree
Hide file tree
Showing 21 changed files with 66 additions and 118 deletions.
2 changes: 1 addition & 1 deletion examples/add-video-block/package-lock.json

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

4 changes: 2 additions & 2 deletions examples/add-video-block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@djsp/block-insert",
"homepage": "https://juliankrispel.github.io/@djsp/core",
"name": "@djsp/add-video-block-example",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion examples/add-video-block/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/core</title>
<title>@djsp/add-video-block-example</title>
</head>

<body>
Expand Down
44 changes: 23 additions & 21 deletions examples/add-video-block/src/InsertBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,30 @@ class UnstyledBlock extends Component {
return (
<div className="paragraph">
<EditorBlock {...this.props} />
{insertLink === true && block.getText().length === 0 && (
<div contentEditable={false} className="insert-link-placeholder">
Paste a youtube link
</div>
)}
{insertLink === true && block.getText().length > 0 && (
<Fragment>
<div contentEditable={false} className="insert-link-instructions">
<span className="fa fa-video" /> Press enter when done
{insertLink === true &&
block.getText().length === 0 && (
<div contentEditable={false} className="insert-link-placeholder">
Paste a youtube link
</div>
<Plugin
handleReturn={(event, editorState) => {
onChange(
replaceWithAtomicBlock(editorState, 'video', {
src: block.getText(),
})
)
return 'handled'
}}
/>
</Fragment>
)}
)}
{insertLink === true &&
block.getText().length > 0 && (
<Fragment>
<div contentEditable={false} className="insert-link-instructions">
<span className="fa fa-video" /> Press enter when done
</div>
<Plugin
handleReturn={(event, editorState) => {
onChange(
replaceWithAtomicBlock(editorState, 'video', {
src: block.getText(),
})
)
return 'handled'
}}
/>
</Fragment>
)}
{showMenu && (
<aside contentEditable={false} className="block-menu">
<button onClick={() => this.setState({ insertLink: true })}>
Expand Down
2 changes: 1 addition & 1 deletion examples/block-switcher/package-lock.json

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

4 changes: 2 additions & 2 deletions examples/block-switcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@djsp/block-switcher",
"homepage": "https://juliankrispel.github.io/@djsp/core",
"name": "@djsp/block-switcher-example",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand Down
3 changes: 1 addition & 2 deletions examples/block-switcher/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/core</title>
<title>@djsp/block-switcher-example</title>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/counter/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/suggestions</title>
<title>@djsp/counter-example</title>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions examples/divider-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"private": true,
"license": "MIT",
"dependencies": {
"@djsp/utils": "^0.1.5",
"@djsp/atomic-block": "^0.1.5",
"@djsp/core": "^0.1.5",
"react": "16.5.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/emoji-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@djsp/emoji-example",
"homepage": "https://juliankrispel.github.io/djs-autocomplete",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion examples/emoji-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/suggestions</title>
<title>@djsp/emoji-example</title>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions examples/inline-toolbar/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@djsp/inline-toolbar-example",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion examples/inline-toolbar/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/core</title>
<title>@djsp/inline-toolbar-example</title>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions examples/linkify-example/src/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class LinkComponent extends Component<Props> {
className: 'link',
}

// eslint-disable-next-line jsx-a11y/anchor-has-content
return <a {...props} />
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/mentions-example/package-lock.json

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

4 changes: 2 additions & 2 deletions examples/mentions-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@djsp/autocomplete-example",
"homepage": "https://juliankrispel.github.io/djs-autocomplete",
"name": "@djsp/mentions-example",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion examples/mentions-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/suggestions</title>
<title>@djsp/mentions-example</title>
</head>

<body>
Expand Down
98 changes: 21 additions & 77 deletions examples/static-toolbar-example/package-lock.json

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

2 changes: 1 addition & 1 deletion examples/static-toolbar-example/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@djsp/static-toolbar-example",
"homepage": "https://github.com/draft-js-plugins/next#readme",
"version": "0.1.5",
"private": true,
"license": "MIT",
Expand All @@ -12,7 +13,6 @@
"react": "16.5.0",
"react-dom": "16.5.0",
"react-scripts": "^1.1.1",
"react-text-selection-popover": "^1.2.1",
"styled-components": "^3.4.5"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/static-toolbar-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/core</title>
<title>@djsp/static-toolbar-example</title>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion examples/undo-example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">

<title>@djsp/suggestions</title>
<title>@djsp/undo-example</title>
</head>

<body>
Expand Down

0 comments on commit 6e41163

Please sign in to comment.