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

Paste improvements #199

Merged
merged 1 commit into from
Nov 2, 2015
Merged

Paste improvements #199

merged 1 commit into from
Nov 2, 2015

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Oct 28, 2015

This improves the ergonomics of pasting into content-kit. Pasting a single non-markup-section (like a card or a list section) now works properly (previously it would be ignored), and it replaces the empty section if the cursor is in an empty section.

Adds validations around tagNames that helps prevent corrupting mobiledocs by creating markupSections with, e.g., "li" tagNames.

It is still possible to confuse postEdtior#insertPost when inserting a post that contains a listSection when the cursor position is already in a listItem, but due to the tagName validations the mobiledoc does not end up with incorrect markup sections in it as a result.

  • handle pasting an empty post
  • Handle passing a non-markup section (list or card) to insertPost
  • make insertPost replace empty sections when pasting
  • Restrict tagNames to valid ones for markup section, list section, list item

fixes #196
fixes #190

 * handle pasting an empty post
 * Handle passing a non-markup section (list or card) to `insertPost`
 * make insertPost replace empty sections when pasting
 * Restrict tagNames to valid ones for markup section, list section, list item

fixes #196
fixes #190
@bantic bantic force-pushed the pasting-empty-content branch from 2f8d486 to d4ce47a Compare October 28, 2015 15:11
bantic added a commit that referenced this pull request Nov 2, 2015
@bantic bantic merged commit 7774864 into master Nov 2, 2015
@bantic bantic deleted the pasting-empty-content branch November 2, 2015 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pasting empty content should do nothing pasting a list should work properly
1 participant