Skip to content

Avoid rejected pastes by optionally wrapping the copied node set in a valid parent that fits into the root container (e.g. body) #138

@michael

Description

@michael

Currently when you want to paste a selection of image grid items somewhere outside an image_grid the paste will not work.

However to avoid this (and similar situations) we can do the following.

If all possible insert positions for the copy pasteload have been tried, try one more thing when arrived at root level (body):

  • Traverse the node schema, by iterating through all node types that are allowed in body.
  • Once you find a node type that has a node_array property that supports all node types of the copy payload, then create an empty node of that type, and put the copy payload into that property

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions