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

Handle copy/pasting properly #111

Closed
bantic opened this issue Sep 3, 2015 · 0 comments · Fixed by #147
Closed

Handle copy/pasting properly #111

bantic opened this issue Sep 3, 2015 · 0 comments · Fixed by #147
Assignees

Comments

@bantic
Copy link
Collaborator

bantic commented Sep 3, 2015

When pasting text into an editor, we should try to add the pasted content to the existing post abstract, matching as closely as possible.

We can also attempt to serialize sections of mobiledoc when copying by overriding the copy event and either setting a custom mime type like "text/mobiledoc" (works on Safari and Chrome) or hijacking the "text/html" mime type (works on Firefox), and prioritize using that if it is found. This makes pasting easier/reliable when working within the same document (which seems like a common use case), and allows cross-window and cross-browser copy/pasting of mobiledoc.

Here's an example codepen showing overridden copied values in action — http://codepen.io/bantic/pen/dYPWea?editors=101

@bantic bantic self-assigned this Sep 17, 2015
@bantic bantic mentioned this issue Sep 17, 2015
6 tasks
@mixonic mixonic mentioned this issue Sep 21, 2015
3 tasks
@bantic bantic removed their assignment Sep 22, 2015
@bantic bantic self-assigned this Oct 21, 2015
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content

fixes #111
bantic added a commit that referenced this issue Oct 22, 2015
  * Rename PostParser -> DOMParser, remove old DOMParser
  * Add many fixtures with example HTML from copying in a google doc document
  * Add postEditor#insertPost. It returns a Position used to position the cursor after inserting content
  * Only allow certain attributes from parsed content
  * filter markup attributes at instantiation
  * when copying, override the native HTML and text copied to display a link to copy-paste issue #180
  * copy/paste cards and lists
  * Handle cut event

fixes #111
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 a pull request may close this issue.

1 participant