Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buttons for creating tables in text editor - SimpleMDE #1531

Closed
atodorov opened this issue Apr 8, 2020 · 5 comments
Closed

Add buttons for creating tables in text editor - SimpleMDE #1531

atodorov opened this issue Apr 8, 2020 · 5 comments
Labels
UI/UX € 50 bounty See bounty-program milestone

Comments

@atodorov
Copy link
Member

atodorov commented Apr 8, 2020

The text editor that we use is called SimpleMDE.

Kiwi TCMS needs a way to insert tables in the document for users who are not familiar with the markdown syntax.

SimpleMDE has the ability to define custom buttons so something like the following will do the trick:

Definition of Done:

  1. A button to insert a table, say 3x3
  2. A button to insert a new row, below the currently selected one
  3. A button to delete the current row
  4. A button to insert a column, to the right of the currently selected one
  5. A button to delete the current column

For more info see the insertTexts and Custom Button examples at:
https://github.com/sparksuite/simplemde-markdown-editor

This issue is part of Kiwi TCMS open source bounty program. For more information see the link(s) in bounty-program milestone

@atodorov atodorov added the € 50 bounty See bounty-program milestone label Apr 8, 2020
@atodorov atodorov added this to the bounty-program milestone Apr 8, 2020
@atodorov atodorov added the UI/UX label Apr 8, 2020
@brymut
Copy link
Contributor

brymut commented Jun 10, 2020

I think SimpleMDE already comes with an insert table button, its just not a default option. I'll try it out and see what it does.

The button adds a 3x2 table (not counting the column separator) .
screenshot of the table insert button

2. A button to insert a new row, below the currently selected one

As for this, would selected mean that a row would be highlighted or the cursor is in anywhere in the row?

brymut added a commit to brymut/Kiwi that referenced this issue Jun 10, 2020
Resolves kiwitcms#1531 Change adds "table" toolbar option in SimpleMDE config
brymut added a commit to brymut/Kiwi that referenced this issue Jun 10, 2020
Change adds "table" toolbar option in SimpleMDE config
brymut added a commit to brymut/Kiwi that referenced this issue Jun 10, 2020
Change adds "table" toolbar option in SimpleMDE config
@atodorov
Copy link
Member Author

As for this, would selected mean that a row would be highlighted or the cursor is in anywhere in the row?

Use cursor position

@brymut
Copy link
Contributor

brymut commented Jun 12, 2020

I've had a closer look at the simplemde and the API provided and it looks like it would be complicated to implement the appropriate parsing, validation and insertion of the appropriate Markdown text to add new columns & rows in place without breaking the user's markdown formatting. Would it be alright to just provide the add table button and leave it to the user to edit the table for themselves?

@atodorov
Copy link
Member Author

Closing this issue b/c implementing the missing table rows/columns functionality should be something that goes inside the text editor itself and we're not getting any user feedback on this issue.

@brymut since you've implemented the button for adding a table markup feel free to claim the bounty attached to this issue.

@brymut
Copy link
Contributor

brymut commented Dec 14, 2020

Thank you @atodorov, submitted new expense at https://opencollective.com/kiwitcms/expenses/29854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI/UX € 50 bounty See bounty-program milestone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants