Closed jamesrwelch closed 2 years ago
Or, like Excel, have the currently-edited value in a box at the top, where there could be a rich-text editor present.
Following the UI standards of Excel may be the best option. The Ag Grid
component may be able to use a custom cell editor to embed our own controls into the editing cell, but it will not look very nice and could be complex to handle the event interactions such as mouse clicks.
Having one mdm-content-editor
embedded on the page might be more feasible. This would mean:
Finding a suitable position for the content editor on the page would have to be determined or experimented with:
Another idea could be to hold the content editor in a dialog, but this would less "inline" than the rest of the spreadsheet.
As part of UI experimentation, here is one example of how editing large amounts of text in cells could be achieved (though not definitive):
Using a custom Ag Grid cell editor, I've been able to embed our Markdown editor into a cell editor popup just to see what it looks like.
width
. How well would it look with paragraphs of text though?I will also experiment with the Excel-like single text editor field as explained in the issue description though to provide a comparison.
Another experiment, this time focusing on what was originally requested in this issue: an Excel-style singular editor which is populated once a cell is clicked:
Currently only for the Markdown editor, but how this works is:
text
profile field - other column types hides the editorOne final UX experiment uses Ag Grid overlays to work around the editing experience:
The overlay is actually designed for a loading prompt, but has been hijacked slightly to instead show and manage an editor and cell update. It works by:
text
cell was clickedI have pushed commits to branch feature/gh-585
which can allow you to test these ideas yourself. To switch text edit styles, update the bulk-edit-editor.component.ts
file with one of the following modes allowed:
/** TESTING ONLY! For experimenting with text editing features */
textEditStyle: 'cell-editor' | 'excel-like' | 'grid-overlay' = 'excel-like';
We made a simplification in the first iteration of the bulk editor, to not try any fancy editing inside the boxes - in particular not using the Jodit / MD editor within the grid. For space / rendering issues, I think having an HTML editor on each text box might be un-workable, but maybe there's a way to pop-up an HTML / MD editor on request?