@yoopta/callout 4.5.2-rc.0 → 4.5.2-rc.2

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.
Files changed (2) hide show
  1. package/README.md +58 -5
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,11 +1,64 @@
1
- # `yoopta-callout`
1
+ # Callout plugin
2
2
 
3
- > TODO: description
3
+ Callout is plugin for Yoopta-Editor
4
4
 
5
- ## Usage
5
+ ### Installation
6
6
 
7
+ ```bash
8
+ yarn add @yoopta/callout
7
9
  ```
8
- const callout = require('yoopta-callout');
9
10
 
10
- // TODO: DEMONSTRATE API
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.0",
3
+ "version": "4.5.2-rc.2",
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": "12417417ff2df9572334d45f7bbea49f867d1d4f"
37
+ "gitHead": "156d69963cc79b2e57eb6347d5cd7063bb7e3792"
38
38
  }