@yoopta/callout 4.5.2-rc.0 → 4.5.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,11 +1,64 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Callout plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Callout is plugin for Yoopta-Editor
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Installation
|
|
6
6
|
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @yoopta/callout
|
|
7
9
|
```
|
|
8
|
-
const callout = require('yoopta-callout');
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import Callout from '@yoopta/callout';
|
|
15
|
+
|
|
16
|
+
const plugins = [Callout];
|
|
17
|
+
|
|
18
|
+
const Editor = () => {
|
|
19
|
+
return <YooptaEditor plugins={plugins} />;
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Default classnames
|
|
24
|
+
|
|
25
|
+
- .yoopta-callout
|
|
26
|
+
- .yoopta-callout-theme-['default' | 'success' | 'warning' | 'error' | 'info']
|
|
27
|
+
|
|
28
|
+
### Default options
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
const Callout = new YooptaPlugin({
|
|
32
|
+
options: {
|
|
33
|
+
display: {
|
|
34
|
+
title: 'Callout',
|
|
35
|
+
description: 'Make writing stand out',
|
|
36
|
+
},
|
|
37
|
+
shortcuts: ['<'],
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### How to extend
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
const plugins = [
|
|
46
|
+
Callout.extend({
|
|
47
|
+
renders: {
|
|
48
|
+
callout: (props) => <YourCustomComponent {...props} />
|
|
49
|
+
},
|
|
50
|
+
options: {
|
|
51
|
+
shortcuts: [`<your custom shortcuts>`],
|
|
52
|
+
align: 'left' | 'center' | 'right',
|
|
53
|
+
display: {
|
|
54
|
+
title: `<your custom title>`,
|
|
55
|
+
description: `<your custom description>`,
|
|
56
|
+
},
|
|
57
|
+
HTMLAttributes: {
|
|
58
|
+
className: '<your classname>',
|
|
59
|
+
// ...other HTML attributes
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
];
|
|
11
64
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/callout",
|
|
3
|
-
"version": "4.5.2-rc.
|
|
3
|
+
"version": "4.5.2-rc.1",
|
|
4
4
|
"description": "Callout plugin for Yoopta Editor",
|
|
5
5
|
"author": "Darginec05 <devopsbanda@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/Darginec05/Editor-Yoopta/issues"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "59437277a9ea6b47bb64b9bbbad8c4a96730ef1d"
|
|
38
38
|
}
|