Skip to content

Commit ea3aee8

Browse files
committed
add docs in field about uploader
1 parent 208046b commit ea3aee8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

7.x-dev/crud-fields.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ CRUD::field([
872872

873873
> NOTE: Summernote does NOT sanitize the input. If you do not trust the users of this field, you should sanitize the input or output using something like HTML Purifier. Personally we like to use install [mewebstudio/Purifier](https://github.com/mewebstudio/Purifier) and add an [accessor or mutator](https://laravel.com/docs/8.x/eloquent-mutators#accessors-and-mutators) on the Model, so that wherever the model is created from (admin panel or app), the output will always be clean. [Example here](https://github.com/Laravel-Backpack/demo/commit/7342cffb418bb568b9e4ee279859685ddc0456c1).
874874
875+
#### Uploading files with summernote
876+
877+
Summernote saves images as base64 encoded strings in the database. If you want to save them as files on the server, you can use the [Summernote File Upload](https://backpackforlaravel.com/docs/7.x/crud-uploaders) . Please note that the Summernote Uploader is part of the `backpack/pro` package.
875878
Input preview:
876879

877880
![CRUD Field - summernote](https://backpackforlaravel.com/uploads/docs-4-2/fields/summernote.png)

7.x-dev/crud-uploaders.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Uploading and managing files is a common task in Admin Panels. In Backpack v7, y
1010
<a name="how-to-use-uploaders"></a>
1111
## How to Use Uploaders
1212

13-
When adding an upload field (`upload`, `upload_multiple`, `image` or `dropzone`) to your operation, tell Backpack that you want to use the appropriate Uploader, by using `withFiles()`:
13+
When adding an upload field (`upload`, `upload_multiple`, `image`, `dropzone`, `easymde`, `summernote`) to your operation, tell Backpack that you want to use the appropriate Uploader, by using `withFiles()`:
1414

1515
```php
1616
CRUD::field('avatar')->type('upload')->withFiles();
@@ -61,7 +61,7 @@ It accepts a `FileNameGeneratorInterface` instance or a closure. As the name imp
6161

6262
We've already created Uploaders for the most common scenarios:
6363
- CRUD comes with `SingleFile`, `MultipleFiles`, `SingleBas64Image`
64-
- PRO comes with `AjaxUploader`, `DropzoneUploader`, `EasyMDEUploader`
64+
- PRO comes with `DropzoneUploader`, `EasyMDEUploader`, `SummernoteUploader`
6565
- if you want to use spatie/medialibrary you can just install [medialibrary-uploaders](https://github.com/Laravel-Backpack/medialibrary-uploaders) to get `MediaAjaxUploader`, `MediaMultipleFiles`, `MediaSingleBase64Image`, `MediaSingleFile`
6666

6767

0 commit comments

Comments
 (0)