Open amis92 opened 2 years ago
Extract FormatEditor component that can edit a RosterFormat object.
Use PRE for output display.
Allow direct HTML (unescaped) output. IFRAME?
Sample HTML format: https://gist.github.com/amis92/f516c3db6bae1ec7bc79400e40de5e27
So to clarify, the goal is to come up with some ideas on how to present the formatted output of a roster right? :)
Well, we need both ideas, and actual templates to be written, so yes, but also templates. :D
Markdown template prototype:
{{roster.name}} ({{roster.gameSystemName}}) {{> costs roster}}
{{#each roster.forces}}
- {{> force}}
{{/each}}
{{#*inline "costs" ~}}
{{#if costs ~}}
[
{{~#each costs as |cost| ~}}
{{#if cost.value ~}}
{{cost.value}} {{cost.name ~}}{{#unless @last}}, {{/unless}}
{{~/if ~}}
{{/each ~}}
]
{{~/if}}
{{~/inline}}
{{#*inline "force"}}
**{{name}} ({{catalogueName}})** {{> costs}}
{{#each selections}}
- {{> selection ~}}
{{/each ~}}
{{/inline}}
{{#*inline "selection"}}
**{{name}}** {{> costs }}
{{#each selections}}
- {{> selection ~}}
{{/each ~}}
{{/inline}}
Format should define also output type, it might be a MIME type for example, or sth else. Default being plain text. Markdown and HTML as options?