Skip to content

Commit

Permalink
Use the Mojolicious template language for CodeMirror when editing ach…
Browse files Browse the repository at this point in the history
…ievement notifications.

The new codemirror-lang-mt package is used for this, and support for
that language has been added to the pg-codemirror-editor.
  • Loading branch information
drgrice1 committed Nov 15, 2024
1 parent 85c4ece commit fba5053
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 32 deletions.
88 changes: 59 additions & 29 deletions htdocs/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 htdocs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.2",
"@openwebwork/pg-codemirror-editor": "^0.0.1-beta.7",
"@openwebwork/codemirror-lang-pg": "^0.0.1-beta.10",
"@openwebwork/pg-codemirror-editor": "^0.0.1-beta.15",
"bootstrap": "~5.3.3",
"flatpickr": "^4.6.13",
"iframe-resizer": "^4.3.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
% }
%
<div class="mb-2">
% # FIXME: This should not be using perl. Mojolicious templates have embedded perl, but are not perl.
<%= generate_codemirror_html($c, 'achievementNotification', $achievementNotification, 'perl') =%></div>
<%= generate_codemirror_html($c, 'achievementNotification', $achievementNotification, 'mt-text') =%></div>
%
% # Output action forms
% my $default_choice;
Expand Down

0 comments on commit fba5053

Please sign in to comment.