Skip to content

Add Table of Contents Content Editor Extension

Paul Slaughter requested to merge 338270-content-editor-toc-extension into master

What does this MR do?

This MR addresses #338270 (closed) by adding a Content Editor extension for handling GFM's Table of Contents functionality (with [[_TOC_]]).

Thanks!

Thanks so much @ealcantara @himkp & @leetickett for pairing with me on this! 🎉

Screenshots or Screencasts (strongly suggested)

Screenshot Demo
Screen_Shot_2021-09-15_at_3.20.44_AM 20210910_toc_content_editor_demo

How to setup and validate locally (strongly suggested)

  1. Start GDK and log in

  2. Go to a project's wiki

  3. Create a new page with something like:

    [[_TOC_]]  
    
    # Lorem  
    
    ## Ipsum  
    
    ## Dolar  
    
    # Sit  
  4. After saving, click "Edit" to edit the newly created page

  5. In the edit page, click "Use new editor"

  6. You should see a box with "Table of Contents"

  7. You can try entering [TOC] or [[_TOC_]] from the new editor which should insert another "Table of Contents" block.

  8. Make sure that nothing changes after save

Does this MR meet the acceptance criteria?

Conformity

Related to #338270 (closed)

Edited by Enrique Alcántara

Merge request reports