Skip to content

Commit

Permalink
Add support for required in Wysiwyg (Tiptap and Quill)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchapi authored and ifox committed May 26, 2020
1 parent a21d9da commit e780bcf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions views/partials/form/_wysiwyg.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@php
$translated = $translated ?? false;
$required = $required ?? false;
$maxlength = $maxlength ?? false;
$options = $options ?? false;
$placeholder = $placeholder ?? false;
Expand Down Expand Up @@ -58,6 +59,7 @@
label: '{{ $label }}',
@include('twill::partials.form.utils._field_name', ['asAttributes' => true])
@if ($note) note: '{{ $note }}', @endif
@if ($required) required: true, @endif
@if ($options) options: {!! e(json_encode($options)) !!}, @endif
@if ($placeholder) placeholder: '{{ $placeholder }}', @endif
@if ($maxlength) maxlength: {{ $maxlength }}, @endif
Expand All @@ -79,6 +81,7 @@
label="{{ $label }}"
@include('twill::partials.form.utils._field_name')
@if ($note) note="{{ $note }}" @endif
@if ($required) :required="true" @endif
@if ($options) :options='{!! json_encode($options) !!}' @endif
@if ($placeholder) placeholder='{{ $placeholder }}' @endif
@if ($maxlength) :maxlength='{{ $maxlength }}' @endif
Expand All @@ -103,6 +106,7 @@
label: '{{ $label }}',
@include('twill::partials.form.utils._field_name', ['asAttributes' => true])
@if ($note) note: '{{ $note }}', @endif
@if ($required) required: true, @endif
@if ($options) options: {!! e(json_encode($options)) !!}, @endif
@if ($placeholder) placeholder: '{{ $placeholder }}', @endif
@if ($maxlength) maxlength: {{ $maxlength }}, @endif
Expand All @@ -124,6 +128,7 @@
label="{{ $label }}"
@include('twill::partials.form.utils._field_name')
@if ($note) note="{{ $note }}" @endif
@if ($required) :required="true" @endif
@if ($options) :options='{!! json_encode($options) !!}' @endif
@if ($placeholder) placeholder='{{ $placeholder }}' @endif
@if ($maxlength) :maxlength='{{ $maxlength }}' @endif
Expand Down

0 comments on commit e780bcf

Please sign in to comment.