mirror of
https://github.com/rveciana/obsidian-cooklang.git
synced 2026-07-22 09:40:31 +00:00
Update .gitignore and Edit.svelte
This commit is contained in:
parent
d50f225317
commit
2b6a3d0023
2 changed files with 8 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -11,7 +11,6 @@ node_modules
|
|||
# Don't include the compiled main.js file in the repo.
|
||||
# They should be uploaded to GitHub releases instead.
|
||||
main.js
|
||||
styles.css
|
||||
|
||||
# Exclude sourcemaps
|
||||
*.map
|
||||
|
|
@ -27,3 +26,4 @@ data.json
|
|||
TODO
|
||||
yarn.lock
|
||||
yarn.lock
|
||||
styles.css
|
||||
|
|
|
|||
|
|
@ -2,12 +2,17 @@
|
|||
export let data:string;
|
||||
export let onChange: (newData: string) => void;
|
||||
$: onChange(data)
|
||||
$: console.log(data);
|
||||
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
||||
<div class="content" contenteditable="true" bind:textContent={data} >{data}</div>
|
||||
<div class="content" contenteditable="true" bind:textContent={data} on:keydown={(e)=>{
|
||||
if (e.key === 'Enter') {
|
||||
document.execCommand('insertLineBreak')
|
||||
e.preventDefault()
|
||||
}}}>{data}</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
@ -18,7 +23,7 @@
|
|||
opacity: 0.6;
|
||||
}
|
||||
.content{
|
||||
white-space: pre
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue