Skip to content

Commit

Permalink
Add missing id attribute to editor's textarea (#359)
Browse files Browse the repository at this point in the history
* Add missing `id` attribute to editor's textarea

Without this, it is impossible to add custom config to a single CKEditor
 instance since `CKEDITOR.replace()` uses the `id` of the field, not the
 name.

Signed-off-by: Micheal Mand <micheal@kmdwebdesigns.com>

* Fix `id` attribute for i18n editor

Signed-off-by: Micheal Mand <micheal@kmdwebdesigns.com>
  • Loading branch information
mikemand authored and nWidart committed Jul 29, 2017
1 parent 13a433f commit d1191f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class='{{ $errors->has("{$lang}.{$fieldName}") ? ' has-error' : '' }}'>
{!! Form::label("{$lang}[{$fieldName}]", $labelName) !!}
<textarea class="{{ $editor->getEditorClass() }}" name="{{$lang}}[{{$fieldName}}]" rows="10" cols="80">{{ $slot }}</textarea>
<textarea class="{{ $editor->getEditorClass() }}" name="{{$lang}}[{{$fieldName}}]" id="{{$lang}}[{{$fieldName}}]" rows="10" cols="80">{{ $slot }}</textarea>
{!! $errors->first("{$lang}.{$fieldName}", '<span class="help-block">:message</span>') !!}
</div>

Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Resources/views/components/textarea.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class='{{ $errors->has($fieldName) ? ' has-error' : '' }}'>
{!! Form::label($fieldName, $labelName) !!}
<textarea class="{{ $editor->getEditorClass() }}" name="{{ $fieldName }}" rows="10" cols="80">{{ $slot }}</textarea>
<textarea class="{{ $editor->getEditorClass() }}" name="{{ $fieldName }}" id="{{ $fieldName }}" rows="10" cols="80">{{ $slot }}</textarea>
{!! $errors->first($fieldName, '<span class="help-block">:message</span>') !!}
</div>

Expand Down

0 comments on commit d1191f3

Please sign in to comment.