diff --git a/index.html b/index.html index 87d57ea..d10025e 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,10 @@ - + - Vite + Svelte + TS + String Manipulator
diff --git a/public/lines.svg b/public/lines.svg new file mode 100644 index 0000000..817c9cd --- /dev/null +++ b/public/lines.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/trash-can.svg b/public/trash-can.svg new file mode 100644 index 0000000..d6ac341 --- /dev/null +++ b/public/trash-can.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file 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 @@
-