Skip to content

Commit 6685609

Browse files
committed
Add visual SettingsTemplate.yaml editor
1 parent 0676fa5 commit 6685609

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

_sidebar.md

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- JSONRPC
2626
- [**JSON RPC Introduction**](/json-rpc.md)
2727
- [**JSON RPC Plugin Settings**](/json-rpc-settings.md)
28+
- [**Visual SettingsTemplate.yaml editor**](/json-rpc-visual-settingstemplate-editor.md)
2829
- Porting Plugins
2930
- [**Porting Plugins Guide**](/port-plugins.md)
3031
- [**How To Create A Theme**](/how-to-create-a-theme.md)

json-rpc-settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ body:
184184
<settings-component-demo type="checkbox" label="Prefer shorter answers" description="If checked, the plugin will try to give answer much shorter than the usual ones."></settings-component-demo>
185185

186186
### Visual editor for `SettingsTemplate.yaml`
187-
You can use a [visual editor](https://flow-launcher-plugin-settings-generator.pages.dev/) for creating the `SettingsTemplate.yaml` file. When you're done editing, click the `Generate SettingsTemplate.yaml` file and copy-paste its contents into your `SettingsTemplate.yaml` file. Optionally, you can also copy the generated typings for your settings object in your preferred programming language.
187+
You can use a [visual editor](#/json-rpc-visual-settingstemplate-editor) for creating the `SettingsTemplate.yaml` file. When you're done editing, click the `Generate SettingsTemplate.yaml` file and copy-paste its contents into your `SettingsTemplate.yaml` file. Optionally, you can also copy the generated typings for your settings object in your preferred programming language.
188188

189189
<script>
190190
const element = document.querySelector('#__settings-script__');
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## SettingsTemplate.yaml editor
2+
3+
Note that data in the editor below is not persisted. It will be lost once you close your browser. Remember to press "Generate SettingsTemplate.yaml" and save the result if you want to keep it.
4+
5+
If you already have a SettingsTemplate.yaml file and would like to try editing it here, just copy its contents and paste it on this page.
6+
7+
<settings-generator></settings-generator>
8+
9+
<script>
10+
const element = document.querySelector('#__settings-script__');
11+
if (!element) {
12+
const script = document.createElement('script');
13+
script.id = '__settings-script__';
14+
script.src = 'https://www.flowlauncher.com/docs/webcomponents/dist/flow-launcher-docs-web-components.js';
15+
script.type = 'module';
16+
document.body.appendChild(script);
17+
}
18+
</script>

0 commit comments

Comments
 (0)