-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
82 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
<?php namespace Samuell\ContentEditor; | ||
<?php | ||
|
||
namespace Samuell\ContentEditor; | ||
|
||
use System\Classes\PluginBase; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% put scripts %} | ||
<script type="text/javascript"> | ||
/* CONTENT EDITOR SCRIPT START */ | ||
ContentTools.StylePalette.add([ | ||
{% for style in __SELF__.palettes %} | ||
new ContentTools.Style('{{ style.name ? style.name : style.class }}', '{{ style.class }}', {{ style.allowed_tags|json_encode()|raw }}), | ||
{% endfor %} | ||
]); | ||
editor.toolbox().tools([ | ||
[ | ||
{% for value in __SELF__.buttons %} | ||
'{{ value }}', | ||
{% endfor %} | ||
], | ||
[ | ||
'undo', | ||
'redo', | ||
'remove' | ||
] | ||
]); | ||
/* CONTENT EDITOR SCRIPT END */ | ||
</script> | ||
{% endput %} | ||
{% put styles %} | ||
<link rel="stylesheet" href="/contenteditor/styles"> | ||
{% endput %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
<?php | ||
|
||
use Samuell\ContentEditor\Http\Middleware\EditorPermissionsMiddleware; | ||
use Samuell\ContentEditor\Http\Controllers\ImageController; | ||
use Samuell\ContentEditor\Http\Controllers\AdditionalStylesController; | ||
|
||
Route::group(['prefix' => 'contenteditor'], function () { | ||
|
||
Route::middleware(['web', EditorPermissionsMiddleware::class])->group(function () { | ||
Route::post('image/upload', 'Samuell\ContentEditor\Http\Controllers\ImageController@upload'); | ||
Route::post('image/save', 'Samuell\ContentEditor\Http\Controllers\ImageController@save'); | ||
}); | ||
Route::middleware(['web', EditorPermissionsMiddleware::class]) | ||
->group(function () { | ||
Route::post('image/upload', [ImageController::class, 'upload']); | ||
Route::post('image/save', [ImageController::class, 'save']); | ||
}); | ||
|
||
// Additional styles route | ||
Route::get('styles', 'Samuell\ContentEditor\Http\Controllers\AdditionalStylesController@render'); | ||
Route::get('styles', [AdditionalStylesController::class, 'render']); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,5 @@ | |
1.3.3: | ||
- Allow only image extensions for upload | ||
- Fix italic tag name | ||
1.3.4: | ||
- Small fixes & code cleanup |