1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

Introduce new Tabular editor with CSV import support

Closes #211 and #202

An all-new tabular editor has been added -- this replaces the previous tabular editor.

Better formatting options.

CSV data can also be imported straight into the table.
This commit is contained in:
Harvey Kandola 2019-03-01 14:28:18 +00:00
parent ed99b0c9f3
commit 25c247e99b
18 changed files with 2224 additions and 14 deletions

View file

@ -24,6 +24,8 @@ export default Component.extend({
defaultTable: '<table class="wysiwyg-table" style="width: 100%;"><thead><tr><th><br></th><th><br></th><th><br></th><th><br></th></tr></thead><tbody><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr></tbody></table>',
didReceiveAttrs() {
this._super(...arguments);
this.set('pageBody', this.get('meta.rawBody'));
if (is.empty(this.get('pageBody'))) {
@ -32,7 +34,10 @@ export default Component.extend({
},
didInsertElement() {
this._super(...arguments);
let id = '#' + this.get('editorId');
$(id).froalaEditor({
toolbarButtons: [],
toolbarInline: true,
@ -47,6 +52,8 @@ export default Component.extend({
},
willDestroyElement() {
this._super(...arguments);
$('#' + this.get('editorId')).off('froalaEditor.contentChanged');
},