yapp 4.0.249 → 5.0.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 CHANGED
@@ -83,7 +83,7 @@ import Yapp from "yapp";
83
83
  import { renderYappStyles } from "yapp";
84
84
 
85
85
  const body = document.querySelector("body"),
86
- yapp = Yapp.fromContent(` ... `);
86
+ yapp = Yapp.fromContentAndOptions(` ... `, {});
87
87
 
88
88
  renderYappStyles();
89
89
 
@@ -105,7 +105,7 @@ import { Body } from "easy";
105
105
  import { renderYappStyles } from "yapp";
106
106
 
107
107
  const body = new Body(),
108
- yapp = Yapp.fromContent(` ... `);
108
+ yapp = Yapp.fromContentAndOptions(` ... `, {});
109
109
 
110
110
  renderYappStyles();
111
111
 
@@ -160,15 +160,15 @@ rootDiv.mount(yapp);
160
160
 
161
161
  ## Configuration
162
162
 
163
- Yapp takes some additional, optional parameters, namely `language`, `Plugin` and `options`. These can be passed as arguments to the `fromContent(...)` factory method or as attributes in the JSX. Intermediate arguments can be left as falsey when passing the latter arguments to the `fromContent(...)` factory method:
163
+ Yapp takes some parameters, These can be passed as arguments to the `fromContentAndOptions(...)` factory method or as attributes in the JSX. Intermediate arguments can be left as falsey when passing the latter arguments to the `fromContentAndOptions(...)` factory method:
164
164
 
165
165
  ```
166
- const language = "json",
167
- options = {
166
+ const options = {
167
+ language: "json",
168
168
  editable: true,
169
169
  onCustomContentChange: coCustomntentChangeHandler
170
170
  },
171
- yapp = Yapp.fromContent(` ... `, language, null, options);
171
+ yapp = Yapp.fromContentAndOptions(` ... `, options);
172
172
  ```
173
173
  When using JSX, the properties of the `options` parameter are in fact passed individually:
174
174
 
@@ -194,7 +194,7 @@ The only other option is the `firaCode` option, covered next.
194
194
 
195
195
  ## Fira Code support
196
196
 
197
- Yapp supports [Fira Code](https://github.com/tonsky/FiraCode). To enable it, add the `firaCode` option either to the `options` object if you are using the `fromContent(...)` factory method or as an attribute if using JSX:
197
+ Yapp supports [Fira Code](https://github.com/tonsky/FiraCode). To enable it, add the `firaCode` option either to the `options` object if you are using the `fromContentAndOptions(...)` factory method or as an attribute if using JSX:
198
198
 
199
199
  ```
200
200
  <Yapp firaCode ... >{`
@@ -330,7 +330,7 @@ You can hide the scrollbars and gutter with the `hiddenScrollbars` and `hiddenGu
330
330
 
331
331
  ## Plugins
332
332
 
333
- If you have been supplied with a plugin, or have written your own, it is straightforward to appraise Yapp of it by way of the aforementioned `Plugin` parameter, passed either as an argument to the `fromContent(...)` factory method or as a JSX attribute. The remainder of this section covers authoring plugins. It assumes that you are able to build the examples, each of which corresponds to a built-in plugin. See the section on building later on for details.
333
+ If you have been supplied with a plugin, or have written your own, it is straightforward to appraise Yapp of it by way of a property of the `options` argument of the `fromContentAndOptions(...)` factory method or as a JSX attribute. The remainder of this section covers authoring plugins. It assumes that you are able to build the examples, each of which corresponds to a built-in plugin. See the section on building later on for details.
334
334
 
335
335
  To begin to author your own plugin, follow these steps:
336
336