Skip to content

Commit

Permalink
Add Mojolicious template support.
Browse files Browse the repository at this point in the history
This will be used for achievement notification editing.
  • Loading branch information
drgrice1 committed Oct 11, 2024
1 parent d7c846c commit 1965e5d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
19 changes: 17 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openwebwork/pg-codemirror-editor",
"version": "0.0.1-beta.7",
"version": "0.0.1-beta.8",
"description": "PG CodeMirror Editor",
"author": "The WeBWorK Project",
"license": "MIT",
Expand Down Expand Up @@ -39,6 +39,7 @@
"cm6-theme-solarized-dark": "^0.2.0",
"cm6-theme-solarized-light": "^0.2.0",
"codemirror": "^6.0.1",
"codemirror-lang-mt": "^0.0.1",
"codemirror-lang-perl": "^0.1.5-beta.1",
"thememirror": "^2.0.1"
},
Expand Down
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ <h1>PG CodeMirror Editor Playground</h1>
<option value="perl">perl</option>
<option value="html">html</option>
<option value="xml">xml</option>
<option value="mt-html">mt-html</option>
<option value="mt-text">mt-text</option>
</select>
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion src/pg-codemirror-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ export class View {
['pg', async () => (await import(/* webpackChunkName: 'pg' */ '@openwebwork/codemirror-lang-pg')).pg()],
['perl', async () => (await import(/* webpackChunkName: 'perl' */ 'codemirror-lang-perl')).perl()],
['html', async () => (await import(/* webpackChunkName: 'html' */ '@codemirror/lang-html')).html()],
['xml', async () => (await import(/* webpackChunkName: 'xml' */ '@codemirror/lang-xml')).xml()]
['xml', async () => (await import(/* webpackChunkName: 'xml' */ '@codemirror/lang-xml')).xml()],
['mt-html', async () => (await import(/* webpackChunkName: 'mt' */ 'codemirror-lang-mt')).mt()],
[
'mt-text',
async () => (await import(/* webpackChunkName: 'mt' */ 'codemirror-lang-mt')).mt({ baseLanguage: null })
]
]);

private currentKeyMap = 'Default';
Expand Down

0 comments on commit 1965e5d

Please sign in to comment.