@quadrats/common 1.1.0 → 1.1.4

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.
@@ -22,7 +22,6 @@ function createImage(options = {}) {
22
22
  const createImageElement = (src, hosting) => {
23
23
  const imageElement = {
24
24
  type: types.image,
25
- figureType: types.figure,
26
25
  src,
27
26
  hosting,
28
27
  children: [{ text: '' }],
@@ -74,7 +74,6 @@ function createImage(options = {}) {
74
74
  const createImageElement = (src, hosting) => {
75
75
  const imageElement = {
76
76
  type: types.image,
77
- figureType: types.figure,
78
77
  src,
79
78
  hosting,
80
79
  children: [{ text: '' }],
@@ -10,7 +10,6 @@ export interface ImageFigureElement extends QuadratsElement, WithElementType {
10
10
  export interface ImageElement extends QuadratsElement, WithElementType {
11
11
  children: [Text];
12
12
  src: string;
13
- figureType: string;
14
13
  /**
15
14
  * e.g. The src of image is `8gy9pbaht92y4.jpg` and your static files are hosted by `https://foo.storage`.
16
15
  * Then you can make the hosting of element be `foo`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadrats/common",
3
- "version": "1.1.0",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "author": "Rytass",
6
6
  "homepage": "https://github.com/Quadrats/quadrats#readme",
@@ -381,10 +381,8 @@ function createTable(options = {}) {
381
381
  });
382
382
  if (cellEntry) {
383
383
  const [, cellPath] = cellEntry;
384
- // 檢查 cell 是否為空
385
- const cellText = Editor.string(editor, cellPath);
386
- if (!cellText.trim() && Editor.isStart(editor, selection.anchor, cellPath)) {
387
- // 在空的 table_cell 開頭按 backspace,不執行任何操作
384
+ if (Editor.isStart(editor, selection.anchor, cellPath)) {
385
+ // table_cell 開頭按 backspace,不執行任何操作
388
386
  return;
389
387
  }
390
388
  }
@@ -645,10 +645,8 @@ function createTable(options = {}) {
645
645
  });
646
646
  if (cellEntry) {
647
647
  const [, cellPath] = cellEntry;
648
- // 檢查 cell 是否為空
649
- const cellText = core.Editor.string(editor, cellPath);
650
- if (!cellText.trim() && core.Editor.isStart(editor, selection.anchor, cellPath)) {
651
- // 在空的 table_cell 開頭按 backspace,不執行任何操作
648
+ if (core.Editor.isStart(editor, selection.anchor, cellPath)) {
649
+ // table_cell 開頭按 backspace,不執行任何操作
652
650
  return;
653
651
  }
654
652
  }