aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/NewPaste.js
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-09-17 10:15:52 -0700
committerjackyzha0 <[email protected]>2020-09-17 10:15:52 -0700
commit620bb9e3bd8faffebfb077a51bbadb03134994b6 (patch)
tree3a14f10dc4b9aea680754656a2717177ddf03734 /frontend/src/components/NewPaste.js
parentMerge pull request #59 from jackyzha0/patch-qol (diff)
downloadctrl-v-620bb9e3bd8faffebfb077a51bbadb03134994b6.tar.xz
ctrl-v-620bb9e3bd8faffebfb077a51bbadb03134994b6.zip
patch bad render mode for non latex and markdown
Diffstat (limited to 'frontend/src/components/NewPaste.js')
-rw-r--r--frontend/src/components/NewPaste.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/src/components/NewPaste.js b/frontend/src/components/NewPaste.js
index b276db8..f778a05 100644
--- a/frontend/src/components/NewPaste.js
+++ b/frontend/src/components/NewPaste.js
@@ -77,8 +77,9 @@ const NewPaste = () => {
}
}
- function insertTab(start, end) {
+ function insertTab(start, end, callback) {
setContent(content.substring(0, start) + ' ' + content.substring(end))
+ callback()
}
function renderPreview() {