jack 5 дней назад
Родитель
Сommit
5e4e5012a5

+ 1 - 3
src/assets/styles/prosemirror.scss

@@ -2,7 +2,7 @@
   outline: 0;
   border: 0;
   font-size: 16px;
-  white-space: normal;
+  white-space: break-spaces;
   &:not(.ProseMirror-static) {
     user-select: text;
   }
@@ -14,7 +14,6 @@
 
   p {
     margin: 0;
-    margin-top: var(--paragraphSpace);
   }
   p:first-child {
     margin-top: 0;
@@ -23,7 +22,6 @@
 
   ul, ol, li {
     margin: 0;
-    margin-top: var(--paragraphSpace);
   }
   ul {
     

+ 1 - 1
src/hooks/useImport.ts

@@ -37,7 +37,7 @@ const convertFontSizePtToPx = (html: string, ratio: number, autoFit: any) => {
   }
   // return html;
   return html.replace(/\s*([\d.]+)pt/g, (match, p1) => {
-    return `${Math.round(parseFloat(p1) * ratio)}px `
+    return `${Math.floor(parseFloat(p1) * ratio)}px `
   })
 
 }

+ 1 - 1
src/views/components/element/ShapeElement/BaseShapeElement.vue

@@ -144,7 +144,7 @@ const text = computed<ShapeText>(() => {
   padding: 5px;
   word-break: break-word;
   pointer-events: none;
-  white-space: normal;
+  white-space: break-spaces;
   &.editable {
     pointer-events: all;
   }

+ 1 - 1
src/views/components/element/ShapeElement/index.vue

@@ -266,7 +266,7 @@ const startEdit = () => {
   padding: 5px;
   word-break: break-word;
   pointer-events: none;
-  white-space: normal;
+  white-space: break-spaces;
 
   &.editable {
     pointer-events: all;

+ 1 - 1
src/views/components/element/TableElement/EditableTable.vue

@@ -796,7 +796,7 @@ table {
 
   .cell {
     position: relative;
-    white-space: normal;
+    white-space: break-spaces;
     word-wrap: break-word;
     vertical-align: middle;
     font-size: 14px;

+ 1 - 1
src/views/components/element/TableElement/StaticTable.vue

@@ -129,7 +129,7 @@ table {
 
   .cell {
     position: relative;
-    white-space: normal;
+    white-space: break-spaces;
     word-wrap: break-word;
     vertical-align: middle;
     background-clip: padding-box;

+ 1 - 1
src/views/components/element/TextElement/BaseTextElement.vue

@@ -101,7 +101,7 @@ const { shadowStyle } = useElementShadow(shadow)
   flex-direction: column;
   word-break: break-word;
   pointer-events: none;
-  white-space: normal;
+  white-space: break-spaces;
   &.editable {
     pointer-events: all;
   }

+ 1 - 1
src/views/components/element/TextElement/index.vue

@@ -233,7 +233,7 @@ watch(isHandleElement, () => {
   flex-direction: column;
   word-break: break-word;
   pointer-events: none;
-  white-space: normal;
+  white-space: break-spaces;
   &.editable {
     pointer-events: all;
   }