38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<div class="form-group {{ $errors->has($name) ? ' has-error' : '' }}" id="form-data-{{ $name }}">
|
|
{{ Form::label($name, $label) }}
|
|
{{ Form::textarea($name, $value, array('class' => 'form-control editor', 'placeholder' => $placeholder)) }}
|
|
<small class="text-danger validation-field">{{ $errors->first($name) }}</small>
|
|
</div>
|
|
<script>
|
|
$(document).ready(function()
|
|
{
|
|
var editor_config = {
|
|
height: '300px',
|
|
language: 'de',
|
|
menubar: true,
|
|
statusbar: false,
|
|
path_absolute: "/",
|
|
selector: "textarea.editor",
|
|
@if(isset($toolbar))
|
|
toolbar: "{{ implode(" | ", array_map(function($items){return implode(" ", $items);},$toolbar)) }}",
|
|
@endif
|
|
external_plugins: {},
|
|
@if(isset($plugins))
|
|
plugins: "{{ implode(" ", $plugins) }}",
|
|
@endif
|
|
nanospell_server: "php",
|
|
browser_spellcheck: true,
|
|
relative_urls: false,
|
|
remove_script_host: false,
|
|
paste_as_text: true,
|
|
setup: function (editor) {
|
|
editor.on('change', function () {
|
|
tinymce.triggerSave();
|
|
});
|
|
}
|
|
};
|
|
|
|
tinymce.remove();
|
|
tinymce.init(editor_config);
|
|
});
|
|
</script> |