Hi @jcfisher007 (@FormBucketSupport)
nice work at extracting CodeMirror from REPL, very useful.
I'm looking at converting a vanilla js app that uses CM into svelte. I skimmed through CodeMirror.svelte and I was trying to understand what features I would need to add/expose to build this use case.
editor1 = CodeMirror(document.getElementById("editor1"), {
theme: "abcdef",
value: defaultEditorCode,
lineNumbers: true,
mode: "javascript",
lineWrapping: true,
matchBrackets: true,
extraKeys: {
[ "Cmd-Enter" ]: () => play(),
["Shift-Enter"]: () => evalExpression(),
["Cmd-."]: () => stop(),
}
});
editor1.setSize("100%", "100%");
editor1.setOption("vimMode", false);
Currently only these props are exposed
export let readonly = false;
export let errorLoc = null;
export let flex = false;
export let lineNumbers = true;
export let tab = true;
I guess it's just a matter of exposing more props and bind the logic, correct?
Thanks,
F
Hi @jcfisher007 (@FormBucketSupport)
nice work at extracting CodeMirror from REPL, very useful.
I'm looking at converting a vanilla js app that uses CM into svelte. I skimmed through CodeMirror.svelte and I was trying to understand what features I would need to add/expose to build this use case.
Currently only these props are exposed
I guess it's just a matter of exposing more props and bind the logic, correct?
Thanks,
F