diff --git a/resources/views/form.blade.php b/resources/views/form.blade.php index 4068328..877ed9a 100644 --- a/resources/views/form.blade.php +++ b/resources/views/form.blade.php @@ -64,7 +64,7 @@
{{'@{{'}} errors.first('{{ $col['name'] }}') }}
-@elseif($col['type'] == 'text')
+@elseif($col['type'] == 'text' && in_array($col['name'], $wysiwygTextColumnNames))
@@ -73,6 +73,15 @@
+@elseif($col['type'] == 'text')
+ +
+
+ +
+ +
+
@elseif($col['type'] == 'boolean')
@@ -89,7 +98,7 @@
- @if(in_array($col['name'], $translatableTextarea))
+ @if(in_array($col['name'], $wysiwygTextColumnNames))
@else diff --git a/src/Generate/ViewForm.php b/src/Generate/ViewForm.php index ec16ea5..93a70a0 100644 --- a/src/Generate/ViewForm.php +++ b/src/Generate/ViewForm.php @@ -191,7 +191,7 @@ protected function buildForm() { 'hasTranslatable' => $this->readColumnsFromTable($this->tableName)->filter(function($column) { return $column['type'] == "json"; })->count() > 0, - 'translatableTextarea' => ['perex', 'text', 'body'], + 'wysiwygTextColumnNames' => ['text', 'body', 'description'], 'relations' => $this->relations, ])->render(); }