Skip to content

Commit

Permalink
Merge pull request #20 from appleple/fix/custom-order#17
Browse files Browse the repository at this point in the history
Fix/custom order#17
  • Loading branch information
uidev1116 authored Jul 8, 2024
2 parents 5082d33 + 11d650d commit 94c6bf3
Show file tree
Hide file tree
Showing 53 changed files with 12,074 additions and 8,322 deletions.
35 changes: 15 additions & 20 deletions demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import SmartBlock from './src/adapter';
import extensions from './src/extensions/';
import Code from './src/extensions/code';
import Image from './src/extensions/image';
import CustomBlock from './src/extensions/custom-block';
import markdown from './sample';
import * as showdown from 'showdown';
import './css/smartblock.css';
Expand All @@ -13,27 +14,21 @@ extensions.push(new Image({
imgFullClassName: 'full',
}))

// import CustomBlock from './src/extensions/custom-block';
// import Heading3 from './src/extensions/heading3';
// custom block
// extensions.push(new CustomBlock({
// tagName: 'h3',
// className: 'foofoo',
// icon: `
// <svg height="24" width="24">
// <circle cx="12" cy="12" r="12" fill="blue" />
// </svg>`
// }))

// extensions.push(new CustomBlock({
// tagName: 'p',
// className: 'hogehoge',
// icon: `
// <svg height="24" width="24">
// <circle cx="12" cy="12" r="12" fill="red" />
// </svg>`
// }))
extensions.push(new CustomBlock({
tagName: 'p',
customName: 's-paragraph',
className: 's-paragraph',
icon: `
<svg height="24" width="24">
<circle cx="12" cy="12" r="12" fill="red" />
</svg>`
}))

extensions.push(new CustomBlock({
tagName: 'h2',
customName: 's-heading2',
className: 's-heading2'
}))

SmartBlock('#app', {
showTitle: true,
Expand Down
2 changes: 1 addition & 1 deletion dist/bulletlist.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/code.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/customblock.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/custommark.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/extensions.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/heading1.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/heading2.js

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

Loading

0 comments on commit 94c6bf3

Please sign in to comment.