Procházet zdrojové kódy

update RichTextConverter

deason před 2 roky
rodič
revize
b9b0f667d9

+ 8 - 2
examcloud-support/src/main/java/cn/com/qmth/examcloud/support/handler/richtext2/RichTextConverter.java

@@ -175,8 +175,14 @@ public class RichTextConverter implements TagConstant {
         }
 
         Param param = new Param();
-        param.setWidth(extractNumber(width));
-        param.setHeight(extractNumber(height));
+        String w = extractNumber(width);
+        String h = extractNumber(height);
+        if (StringUtils.isNotEmpty(w)) {
+            param.setWidth(w);
+        }
+        if (StringUtils.isNotEmpty(h)) {
+            param.setHeight(h);
+        }
 
         Block block = new Block();
         block.setType(BlockType.image);