feat(editor-v2): _editor_assets.html Jinja partial
Five-line partial included on every page that mounts an editor. Two <link> stylesheets (vendor + glue) and two nonce'd <script> tags (bundle + glue). The `defer` attribute preserves document order, so editor.bundle.js (which assigns window.__editor) executes before editor.js (which reads it). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e4f863415e
commit
b1a6290c8c
1 changed files with 5 additions and 0 deletions
5
l4d2web/l4d2web/templates/_editor_assets.html
Normal file
5
l4d2web/l4d2web/templates/_editor_assets.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{# Editor assets — include on any page that mounts a <textarea data-editor-language>. #}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='vendor/editor.bundle.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/editor.css') }}">
|
||||
<script src="{{ url_for('static', filename='vendor/editor.bundle.js') }}" nonce="{{ g.csp_nonce }}" defer></script>
|
||||
<script src="{{ url_for('static', filename='js/editor.js') }}" nonce="{{ g.csp_nonce }}" defer></script>
|
||||
Loading…
Reference in a new issue