pimelon-ui 0.1.207 → 0.1.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pimelon-ui",
3
- "version": "0.1.207",
3
+ "version": "0.1.209",
4
4
  "description": "A set of components and utilities for rapid UI development",
5
5
  "main": "./src/index.ts",
6
6
  "type": "module",
@@ -166,10 +166,11 @@ onMounted(() => {
166
166
  addKeyboardShortcuts() {
167
167
  return {
168
168
  Backspace: () => {
169
- const { $from } = this.editor.view.state.selection
169
+ const selection = this.editor.view.state.selection
170
+ const { $from } = selection
170
171
  if (
171
172
  !this.editor.can().liftListItem('listItem') ||
172
- $from.parentOffset > 0
173
+ $from.parentOffset > 0 || !selection.empty
173
174
  )
174
175
  return false
175
176
  return this.editor.commands.liftListItem('listItem')
@@ -45,6 +45,7 @@ export const ContentPasteExtension = Extension.create<ContentPasteOptions>({
45
45
 
46
46
  // Override clipboard HTML
47
47
  event.clipboardData?.setData('text/html', container.innerHTML)
48
+ event.clipboardData?.setData('text/plain', selection.toString())
48
49
  event.preventDefault()
49
50
  return true
50
51
  },