Files
discourse-table-builder/javascripts/discourse/templates/components/spreadsheet-editor.hbs
T
Keegan George 86af126978 FIX: Spreadsheet only loading for one instance
This commit moves spreadsheet logic to a component which resolves the issue where the spreadsheet only loads the first time the edit modal appears.
2022-07-14 08:56:11 -07:00

26 lines
703 B
Handlebars

<DModalBody
@title={{theme-prefix "discourse_table_builder.edit.modal.title"}}
@class="table-editor-modal"
>
{{! TODO: Parse .md to json and fill table }}
{{! TODO: Fix instances where multiple tables in a single post }}
{{! TODO better id name }}
<div id="spreadsheet" tabindex="1" class="jexcel_container"></div>
</DModalBody>
<div class="modal-footer">
<DButton
@class="btn-edit-table"
@label={{theme-prefix "discourse_table_builder.edit.modal.create"}}
@icon="pencil-alt"
@action={{action "editTable"}}
/>
<DButton
@class="btn-flat"
@label={{theme-prefix "discourse_table_builder.edit.modal.cancel"}}
@action={{action "cancelTableEdit"}}
/>
</div>