@php-script/editor-svelte
v0.1.2
Published
Svelte 5 wrapper for the <php-script-editor> web component (bind:value support).
Downloads
104
Readme
@php-script/editor-svelte
Documentation: https://php-script.github.io/php-script-editor/packages/svelte.html
Svelte 5 wrapper for the <php-script-editor> web component, with bind:value. Loads the element in onMount, so it is safe with SvelteKit SSR.
Installation
npm i @php-script/editor-svelte monaco-editorUsage
<script lang="ts">
import { PhpScriptEditor } from '@php-script/editor-svelte';
let code = $state('echo "Hello";');
</script>
<PhpScriptEditor bind:value={code} configUrl="/php-script/config" />See the documentation for all props, events and methods, and Server and language config for the endpoints.
