Browse Source

编辑器高度设置

jqh 5 years ago
parent
commit
89b012925a
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/Form/Field/Editor.php

+ 13 - 0
src/Form/Field/Editor.php

@@ -38,6 +38,7 @@ class Editor extends Field
             'undo redo | preview fullscreen | styleselect | fontsizeselect bold italic underline strikethrough forecolor backcolor | link image media blockquote removeformat codesample',
             'undo redo | preview fullscreen | styleselect | fontsizeselect bold italic underline strikethrough forecolor backcolor | link image media blockquote removeformat codesample',
             'alignleft aligncenter alignright  alignjustify| indent outdent bullist numlist table subscript superscript | code',
             'alignleft aligncenter alignright  alignjustify| indent outdent bullist numlist table subscript superscript | code',
         ],
         ],
+        'min_height' => 400,
         'save_enablewhendirty' => true,
         'save_enablewhendirty' => true,
     ];
     ];
 
 
@@ -97,6 +98,18 @@ class Editor extends Field
         return $this->options(['language_url' => $url]);
         return $this->options(['language_url' => $url]);
     }
     }
 
 
+    /**
+     * 设置编辑器高度.
+     *
+     * @param int $height
+     *
+     * @return $this
+     */
+    public function height(int $height)
+    {
+        return $this->options(['min_height' => $height]);
+    }
+
     /**
     /**
      * @return string
      * @return string
      */
      */