@potch/html-bin 2.1.2 → 2.2.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 +6 -8
- package/build/index.min.js +1 -1
- package/build/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +50 -24
- package/src/style.css +19 -0
package/README.md
CHANGED
|
@@ -19,8 +19,9 @@ create a bin component.
|
|
|
19
19
|
Options:
|
|
20
20
|
|
|
21
21
|
- `container` (optional Element): will automatically append the bin if provided
|
|
22
|
-
- `
|
|
23
|
-
|
|
22
|
+
- `extraClasses`: a string of extra CSS classes to append to the bin element
|
|
23
|
+
- `sources`: object with optional `{ js, css, html }` strings of source to put in the corresponding editors
|
|
24
|
+
- `splitMode`: (default `true`) whether to have the preview in split screen with code tabs.
|
|
24
25
|
- `split`: number from [0, 1] specifying the ratio between the editor and
|
|
25
26
|
preview panes. defaults to `0.5`
|
|
26
27
|
- `width`: CSS string to override default `--bin-width` value. defaults to `100%`
|
|
@@ -29,10 +30,7 @@ Options:
|
|
|
29
30
|
Returns object with the following fields:
|
|
30
31
|
|
|
31
32
|
- `el`: Element of the outermost HTML element of the bin
|
|
32
|
-
- `editors`: contains `{ js, css, html }` properties with the CodeMirror
|
|
33
|
-
instances for each editor tab
|
|
33
|
+
- `editors`: contains `{ js, css, html }` properties with the CodeMirror instances for each editor tab
|
|
34
34
|
- `activeTab`: a signal representing the currently active editor tab
|
|
35
|
-
- `start`: call this function if you did not provide the `container` option
|
|
36
|
-
|
|
37
|
-
- `teardown`: call this if you are removing and destroying the bin to
|
|
38
|
-
disconnect all listeners
|
|
35
|
+
- `start`: call this function if you did not provide the `container` option after attaching `el` to the DOM
|
|
36
|
+
- `teardown`: call this if you are removing and destroying the bin to disconnect all listeners
|