jupytercalpoly / jupyterlab-richtext-mode

JupyterLab extension for rich text editing in the notebook
43 stars 18 forks source link

Add rich text relevant features to context menu #34

Open isabela-pf opened 4 years ago

isabela-pf commented 4 years ago

Even though Prosemirror in Markdown cells promotes a new experience, the context menu is the same and thus lacks relevant utility. Some of the things it should be updated to include are to open links (even when cell is not yet run) and copy and paste content, not just whole cells.

I will update this with further ideas of what needs to be in the context menu.

isabela-pf commented 4 years ago

Based on completing tasks within the prototype and comparing the context menus of word processors, I've made a list of a few items I'd like to be added to the current context menu when right-clicking on a Markdown cell. Ordered from highest priority to lowest:

  1. Open Link
  2. Make Link
  3. Clear Formatting
  4. Cut Content
  5. Copy Content
  6. Paste Content
  7. Select All Cell Content

If possible, I think we can remove the existing menu items surrounding outputs (Clear All Outputs, Enable Scrolling For Outputs, Disable Scrolling for Outputs) since Markdown cells do not have outputs. Once again, these changes should only be made for context menus activated in a Markdown cell.

isabela-pf commented 4 years ago

Mockup of proposal:

proposed_context_menu

Everything after Open Inspector is an addition, and all output controls are not visible.

isabela-pf commented 4 years ago

As we developed the ability to toggle between raw Markdown and rich text editing (#10), we thought it would be best to put the toggle options in the context menu. This means users do not have to solely rely on shortcuts, and leaves room for other other editors to be listed if more editor swapping options become available in the future.

Everything else is the same as listed in the previous comment.

Mockup:

Change Editor View - Context Menu 1 1

Change Editor View - Context Menu 1 2