D
Deno
monaco-editor on fresh - Deno
R
Deno
•
4y ago
•
1 reply
rnbguy
monaco-editor on fresh
Hello
. First of all
, I am a newbie in web development
. I played around with Deno for a while
. So I thought I will leverage it to finally get into web development via Fresh
.
For a toy project
, I am trying to build a code playground
(like
,
https://play.yew.rs
)
. I want to use monaco
-editor
(
https://www.npmjs.com/package/monaco-editor
)
. But monaco
-editor works with HTMLElement
(
https://microsoft.github.io/monaco-editor/docs.html#functions/editor.create.html
)
, instead of Preact
.
I could make it work as a static code
(
https://github.com/rnbguy/fresh-playground/blob/264e11813d549fe91b7bf2be38b454610bc5c676/components/Playground.tsx
)
, but I need to add code in the island components to get the value from the editor using monaco API
(
https://microsoft.github.io/monaco-editor/docs.html#interfaces/editor.ICodeEditor.html#getValue
) here
-
https://github.com/rnbguy/fresh-playground/blob/264e11813d549fe91b7bf2be38b454610bc5c676/islands/Run.tsx#L12
.
PS
. I am aware of
https://www.npmjs.com/package/@monaco-editor/react
. Probably I need something similar working with Preact
.
Deno
Join
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Is there a rich text (wysiwyg) editor for deno fresh ?
L
Likone / help
3y ago
Has anyone set up Deno's LSP on WASM with monaco?
L
localhost / help
2y ago
Fresh - Error while running deno run on the built _fresh directory
S
Stéphane / help
2y ago