diff --git a/src/App.svelte b/src/App.svelte index e0178d5..bb581fa 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -3,20 +3,15 @@ import ManipulationsPanel from "./ManipulationsPanel.svelte"; import TextArea from "./components/TextArea.svelte"; + import Heading from "./components/Heading.svelte"; - let source = "Try me!\nPress \"Apply\"" + let source = "Try me!\nResult will update automatically" let result = "" let manipulations: TManipulation[] = [{ type: "replace", - from: "\\n", to: "--", id: "initial" + from: "\\n", to: " -- ", id: "initial" }] - function onApply(event: MouseEvent) { - if (event.type == "click") { - result = applyManipulations(source, manipulations) - } - } - document.addEventListener("keydown", (event) => { if (event.ctrlKey && event.key === "Enter") { result = applyManipulations(source, manipulations) @@ -28,26 +23,29 @@
-