yapp 4.0.227 → 4.0.230
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 +4 -4
- package/example.js +873 -802
- package/lib/customEventTypes.js +13 -0
- package/lib/div/{overlay.js → pretty.js} +17 -17
- package/lib/example/view.js +3 -3
- package/lib/prettyPrinter.js +19 -13
- package/lib/richTextarea.js +5 -4
- package/lib/yapp.js +16 -12
- package/package.json +4 -4
- package/src/customEventTypes.js +3 -0
- package/src/div/{overlay.js → pretty.js} +8 -8
- package/src/example/view.js +2 -2
- package/src/prettyPrinter.js +26 -14
- package/src/richTextarea.js +5 -3
- package/src/yapp.js +27 -22
package/README.md
CHANGED
|
@@ -166,23 +166,23 @@ Yapp takes some additional, optional parameters, namely `language`, `Plugin` and
|
|
|
166
166
|
const language = "json",
|
|
167
167
|
options = {
|
|
168
168
|
editable: true,
|
|
169
|
-
|
|
169
|
+
onCustomContentChange: coCustomntentChangeHandler
|
|
170
170
|
},
|
|
171
171
|
yapp = Yapp.fromContent(` ... `, language, null, options);
|
|
172
172
|
```
|
|
173
173
|
When using JSX, the properties of the `options` parameter are in fact passed individually:
|
|
174
174
|
|
|
175
175
|
```
|
|
176
|
-
<Yapp language="json" editable
|
|
176
|
+
<Yapp language="json" editable onCustomContentChange={coCustomntentChangeHandler} >{`
|
|
177
177
|
|
|
178
178
|
...
|
|
179
179
|
|
|
180
180
|
`}</Yapp>
|
|
181
181
|
```
|
|
182
|
-
If Yapp is made editable, the `
|
|
182
|
+
If Yapp is made editable, the `coCustomntentChangeHandler(...)` callback should take the following form:
|
|
183
183
|
|
|
184
184
|
```
|
|
185
|
-
function
|
|
185
|
+
function coCustomntentChangeHandler(content) {
|
|
186
186
|
|
|
187
187
|
...
|
|
188
188
|
|