Skip to content

Commit

Permalink
Pretty print XML inside code editor, closes #895
Browse files Browse the repository at this point in the history
  • Loading branch information
danyill committed Mar 10, 2023
1 parent dc8a56d commit 765796c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wizard-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
identity,
WizardInput,
WizardMenuActor,
formatXml,
} from './foundation.js';

function renderWizardInput(
Expand Down Expand Up @@ -325,7 +326,9 @@ export class WizardDialog extends LitElement {
style="width: 80vw; height: calc(100vh - 240px);"
theme="ace/theme/solarized_${localStorage.getItem('theme')}"
mode="ace/mode/xml"
value="${new XMLSerializer().serializeToString(page.element)}"
value="${formatXml(
new XMLSerializer().serializeToString(page.element)
)}"
></ace-editor>`
: page.content?.map(renderWizardInput)}
</div>
Expand Down

0 comments on commit 765796c

Please sign in to comment.