@blockly/field-multilineinput 3.0.3 → 3.0.4
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 +24 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,17 +15,28 @@ npm install @blockly/field-multilineinput --save
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
This field accepts up to 3 parameters:
|
|
20
|
+
* "text" to specify the default text. Defaults to `""`.
|
|
21
|
+
* "maxLines" to specify the maximum number of lines displayed before scrolling
|
|
22
|
+
functionality is enabled. Defaults to `Infinity`.
|
|
23
|
+
* "spellcheck" to specify whether spell checking is enabled. Defaults to
|
|
24
|
+
`true`.
|
|
25
|
+
|
|
26
|
+
The multiline input field is a subclass of Blockly.FieldInput
|
|
19
27
|
|
|
20
28
|
### JavaScript
|
|
21
29
|
```js
|
|
22
30
|
import * as Blockly from 'blockly';
|
|
23
31
|
import {FieldMultilineInput} from '@blockly/field-multilineinput';
|
|
32
|
+
|
|
24
33
|
Blockly.Blocks["test_field_multilineinput"] = {
|
|
25
34
|
init: function () {
|
|
26
35
|
this.appendDummyInput()
|
|
27
36
|
.appendField("multilineinput: ")
|
|
28
|
-
.appendField(
|
|
37
|
+
.appendField(
|
|
38
|
+
new FieldMultilineInput("some text \n with newlines"),
|
|
39
|
+
"FIELDNAME");
|
|
29
40
|
}
|
|
30
41
|
};
|
|
31
42
|
```
|
|
@@ -34,6 +45,7 @@ Blockly.Blocks["test_field_multilineinput"] = {
|
|
|
34
45
|
```js
|
|
35
46
|
import * as Blockly from 'blockly';
|
|
36
47
|
import '@blockly/field-multilineinput';
|
|
48
|
+
|
|
37
49
|
Blockly.defineBlocksWithJsonArray([
|
|
38
50
|
{
|
|
39
51
|
"type": "test_field_multilineinput",
|
|
@@ -42,12 +54,20 @@ Blockly.defineBlocksWithJsonArray([
|
|
|
42
54
|
{
|
|
43
55
|
"type": "field_multilineinput",
|
|
44
56
|
"name": "FIELDNAME",
|
|
45
|
-
"
|
|
57
|
+
"text": "some text \n with newlines"
|
|
46
58
|
}
|
|
47
|
-
]
|
|
48
59
|
}]);
|
|
49
60
|
```
|
|
50
61
|
|
|
62
|
+
### API reference
|
|
63
|
+
|
|
64
|
+
* `setMaxLines`: Sets the maximum number of displayed lines before
|
|
65
|
+
scrolling functionality is enabled.
|
|
66
|
+
* `getMaxLines`: Returns the maximum number of displayed lines before
|
|
67
|
+
scrolling functionality is enabled.
|
|
68
|
+
* `setSpellcheck`: Sets whether spell checking is enabled.
|
|
69
|
+
* `getSpellcheck`: Returns whether spell checking is enabled.
|
|
70
|
+
|
|
51
71
|
## License
|
|
52
72
|
|
|
53
73
|
Apache 2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockly/field-multilineinput",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "A Blockly multilineinput field.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"audit:fix": "blockly-scripts auditFix",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=8.0.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "993c4b87b60250ec41566921a5012cfc07a35e48"
|
|
65
65
|
}
|