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

Cannot add card to list element #8157

Closed
disordinary opened this issue Mar 14, 2017 · 2 comments
Closed

Cannot add card to list element #8157

disordinary opened this issue Mar 14, 2017 · 2 comments
Labels
affects:admin Anything relating to Ghost Admin affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly

Comments

@disordinary
Copy link
Contributor

disordinary commented Mar 14, 2017

If you are in a list element and try to add a card with the / menu mobiledoc generates an error.

The error is not recoverable.

@kevinansfield kevinansfield added the affects:editor Work relating to the Koenig Editor label Mar 14, 2017
@kevinansfield kevinansfield added this to the 1.0.0 milestone Mar 14, 2017
@disordinary
Copy link
Contributor Author

There is a bug in mobiledoc-kit which breaks the obvious solution to this. Investigating what's required for a fix.

@disordinary
Copy link
Contributor Author

I've put a temporary fix in place which places the card at the bottom of a list, I'll look at a proper fix in the future so that lists behave the same as other blocks but this behaviour is acceptable.

disordinary added a commit to disordinary/Ghost-Admin that referenced this issue Mar 15, 2017
Refs: TryGhost/Ghost#8157

Currently mobiledoc-kit doesn't allow the inserting or replacing of a list item with a card.

There is a solution that works toggling the section to a `p` then replacing the section, however there are issues with the mobiledoc range object becoming out of sync and the workarounds for that are too hacky.

We need to update mobiledoc to deal with this usecase (although the way that ranges are handled during undo might also be an option worth exploring), but for now we'll simply insert a card at the bottom of the list which is unfortunately different behaviour from any other block.
kevinansfield pushed a commit to TryGhost/Admin that referenced this issue Mar 15, 2017
refs TryGhost/Ghost#8157

Currently mobiledoc-kit doesn't allow the inserting or replacing of a list item with a card.

There is a solution that works toggling the section to a `p` then replacing the section, however there are issues with the mobiledoc range object becoming out of sync and the workarounds for that are too hacky.

We need to update mobiledoc to deal with this usecase (although the way that ranges are handled during undo might also be an option worth exploring), but for now we'll simply insert a card at the bottom of the list which is unfortunately different behaviour from any other block.
@kirrg001 kirrg001 removed this from the 1.0.0 Beta Ready milestone Mar 20, 2017
@ErisDS ErisDS added the bug [triage] something behaving unexpectedly label Apr 11, 2017
@kevinansfield kevinansfield added later [triage] Things we intend to work but are not immediate priority affects:admin Anything relating to Ghost Admin labels May 13, 2017
@ErisDS ErisDS removed later [triage] Things we intend to work but are not immediate priority labels Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

4 participants