Skip to content

Commit 4bacd06

Browse files
committed
chore: updated documentation
1 parent 3de40a7 commit 4bacd06

File tree

7 files changed

+94
-23
lines changed

7 files changed

+94
-23
lines changed

package-lock.json

Lines changed: 16 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@algolia/autocomplete-core": "^1.9.2",
1414
"@headlessui/react": "^2.1.0",
1515
"@markdoc/markdoc": "^0.4.0",
16-
"@markdoc/next.js": "^0.3.4",
16+
"@markdoc/next.js": "^0.3.7",
1717
"@sindresorhus/slugify": "^2.1.0",
1818
"@tailwindcss/typography": "^0.5.7",
1919
"autoprefixer": "^10.4.12",
@@ -23,10 +23,10 @@
2323
"js-yaml": "^4.1.0",
2424
"next": "^14.0.4",
2525
"next-themes": "^0.2.1",
26-
"prism-react-renderer": "^2.0.6",
26+
"prism-react-renderer": "^2.4.1",
2727
"react": "^18.2.0",
2828
"react-dom": "^18.2.0",
29-
"react-highlight-words": "^0.20.0",
29+
"react-highlight-words": "^0.21.0",
3030
"simple-functional-loader": "^1.2.1",
3131
"tailwindcss": "^3.4.1"
3232
},

public/nw-textarea.png

99.3 KB
Loading

src/app/docs/intro/installation/page.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ NetWizard depends on the following dependencies to work properly. Please stricly
1616

1717
### For ESP32
1818

19-
- [ESP32 Arduino Core](https://github.com/espressif/arduino-esp32) >= **v3.0.3**
20-
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) - **v7.1.0**
19+
- [ESP32 Arduino Core](https://github.com/espressif/arduino-esp32) >= **v3.1.0**
20+
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) - **v7.3.0**
2121

2222

2323
### For RP2040 + W
2424

25-
- [Arduino Pico Core](https://github.com/earlephilhower/arduino-pico) >= **v3.9.3**
26-
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) - **v7.1.0**
25+
- [Arduino Pico Core](https://github.com/earlephilhower/arduino-pico) >= **v4.4.1**
26+
- [ArduinoJson](https://github.com/bblanchon/ArduinoJson) - **v7.3.0**
2727
- [Preferences](https://github.com/vshymanskyy/Preferences) - **v2.1.0**
2828

2929
---
@@ -51,13 +51,19 @@ Go to Sketch > Include Library > Library Manager > Search for "NetWizard" > Inst
5151

5252
## For PlatformIO
5353

54-
### Modifications in PlatformIO.ini
54+
### Modifications in platformio.ini
5555

5656
As NetWizard supports multiple platforms, before you install/import NetWizard in your PlatformIO projects, it's neccessary to add these following lines in your `platformio.ini` file for your project to compile successfully:
5757

5858
```ini
59-
lib_compat_mode = soft
60-
lib_ldf_mode = chain
59+
lib_compat_mode = strict
60+
lib_ldf_mode = deep # This line may or may not be neccessary depending on your project
61+
```
62+
63+
**For ESP32:** Switch to the `pioarduino/platform-espressif32` platform inside your platformio.ini file so that you have the latest Arduino ESP32 core. *Currently, official releases from PIO team of ESP32 platform is stuck on Arduino Core v2 which doesn't have the required features for NetWizard to compile.*
64+
65+
```ini
66+
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10/platform-espressif32.zip
6167
```
6268

6369
### 1. Import through PlatformIO

src/app/docs/parameters/setup/page.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Parameters can be of following types, please refer to each type for more details
3535
- [Input](/docs/parameters/types/input)
3636
- [Password Input](/docs/parameters/types/password-input)
3737
- [Toggle](/docs/parameters/types/toggle)
38+
- [Textarea](/docs/parameters/types/textarea)
3839

3940
## API Reference
4041

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
title: Textarea
3+
nextjs:
4+
metadata:
5+
title: Parameters | Textarea
6+
description: Learn more about textarea parameter type in NetWizard.
7+
---
8+
9+
![Textarea](/nw-textarea.png)
10+
11+
You can create an `Textarea` parameter type that will be displayed as a multi-line text input on the configuration page. This is particularly useful when you want to collect application specific input from the user. For example: TLS certificates, keys or other data which is best suited to be entered in a multi-line format.
12+
13+
## Constructor
14+
15+
The constructor of `Textarea` parameter type takes 3 useful parameters:
16+
17+
- `name` - The name of the parameter
18+
- `value` - The default value of the parameter *(optional - can be set as empty string)*
19+
- `placeholder` - The placeholder which is displayed when the input is empty *(optional - can be set as empty string)*
20+
21+
```cpp
22+
NetWizardParameter nw_textarea(&NW, NW_TEXTAREA, "Name", "Value", "Placeholder");
23+
```
24+
25+
## API Reference
26+
27+
### Initialization
28+
29+
```cpp
30+
NetWizard NW(&server);
31+
32+
NetWizardParameter nw_textarea(&NW, NW_TEXTAREA, "Root CA", "", "-----BEGIN CERTIFICATE-----\n-----END CERTIFICATE-----"); // <-- add this line
33+
34+
void setup() {
35+
...
36+
}
37+
38+
void loop() {
39+
...
40+
}
41+
```
42+
43+
### Getters
44+
45+
```cpp
46+
// Store the value of the input in `val` using `getValue`
47+
String val;
48+
nw_textarea.getValue(val);
49+
```
50+
51+
```cpp
52+
String val = nw_textarea.getValueStr(); // <-- get value inline
53+
```
54+
55+
### Setters
56+
57+
```cpp
58+
// Set the value of the input using `setValue`
59+
nw_textarea.setValue("Value123");
60+
```

src/lib/navigation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const navigation = [
3232
{ title: 'Input', href: '/docs/parameters/types/input' },
3333
{ title: 'Password Input (Pro)', href: '/docs/parameters/types/password-input' },
3434
{ title: 'Toggle (Pro)', href: '/docs/parameters/types/toggle' },
35+
{ title: 'Textarea (Pro)', href: '/docs/parameters/types/textarea' },
3536
]
3637
},
3738
{

0 commit comments

Comments
 (0)