feat: added in monaco setups and hooks

This commit is contained in:
2026-04-27 20:15:55 +02:00
parent 22f625ced0
commit dba10eab24
5 changed files with 66 additions and 6 deletions

View File

@@ -31,7 +31,7 @@
data-monaco-editor-id={@script_editor.id}
data-monaco-input-id={"script-editor-content-#{@script_editor.id}"}
data-monaco-language="lua"
data-monaco-word-wrap="off"
data-monaco-word-wrap="on"
>
<div id={"script-editor-monaco-#{@script_editor.id}"} class="monaco-editor-instance" phx-update="ignore"></div>
<textarea id={"script-editor-content-#{@script_editor.id}"} class="monaco-editor-input code-editor-textarea" name="script_editor[content]" spellcheck="false"><%= @script_editor.content %></textarea>

View File

@@ -29,7 +29,7 @@
data-monaco-editor-id={@template_editor.id}
data-monaco-input-id={"template-editor-content-#{@template_editor.id}"}
data-monaco-language="liquid"
data-monaco-word-wrap="off"
data-monaco-word-wrap="on"
>
<div id={"template-editor-monaco-#{@template_editor.id}"} class="monaco-editor-instance" phx-update="ignore"></div>
<textarea id={"template-editor-content-#{@template_editor.id}"} class="monaco-editor-input code-editor-textarea" name="template_editor[content]" spellcheck="false"><%= @template_editor.content %></textarea>

View File

@@ -394,7 +394,7 @@
phx-hook="MonacoEditor"
data-monaco-editor-id={@post_editor.id}
data-monaco-input-id={"post-editor-content-#{@post_editor.id}"}
data-monaco-language="markdown"
data-monaco-language="markdown-with-macros"
data-monaco-word-wrap="on"
data-monaco-insert-event="post-editor-insert-content"
>