-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 151ba80
Showing
80 changed files
with
3,626 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.idea | ||
.DS_Store | ||
|
||
/vendor/ | ||
/node_modules/ | ||
/composer.lock | ||
/.php_cs.cache | ||
/.phpunit.result.cache | ||
|
||
/etc/build/* | ||
!/etc/build/.gitignore | ||
|
||
/tests/Application/yarn.lock | ||
|
||
/behat.yml | ||
/phpspec.yml | ||
/phpunit.xml |
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,55 @@ | ||
### Sylius Tinymce plugin | ||
|
||
## Description | ||
#### Use tinymce edit product description and short_description | ||
|
||
### version 1.0.0 | ||
#### this is first version | ||
#### i am sylius plugin beginner, so make sure install on your dev environment test first | ||
#### If you can point out any errors in my code or suggest a better way, please leave a comment. | ||
|
||
## Screenshots | ||
![image](1.png) | ||
![image](2.png) | ||
|
||
## Installation | ||
1. Run `composer require jinber/sylius-tinymce-plugin` | ||
|
||
2. Enable the plugin in bundles.php | ||
|
||
```php | ||
<?php | ||
// config/bundles.php | ||
|
||
return [ | ||
// ... | ||
Jinber\SyliusTinymcePlugin\JinberSyliusTinymcePlugin::class => ['all' => true], | ||
]; | ||
``` | ||
|
||
3. Import the plugin configurations | ||
|
||
```yml | ||
# config/packages/_sylius.yaml | ||
imports: | ||
# ... | ||
- { resource: '@JinberSyliusTinymcePlugin/config/config.yaml' } | ||
``` | ||
4. Add the shop and admin routes | ||
```yml | ||
# config/routes.yaml | ||
sylius_jinber_tinymce_admin: | ||
resource: '@JinberSyliusTinymcePlugin/config/routes/admin_route.yaml' | ||
prefix: '/admin' | ||
``` | ||
5. installing assets | ||
``` | ||
php bin/console assets:install | ||
php bin/console cache:clear | ||
``` | ||
|
||
## Buy me coffee | ||
[![paypal](https://www.paypalobjects.com/digitalassets/c/website/marketing/apac/C2/logos-buttons/optimize/44_Yellow_PayPal_Pill_Button.png)](https://www.paypal.me/jinbercom) |
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,18 @@ | ||
{ | ||
"name": "jinber/sylius-tinymce-plugin", | ||
"type": "sylius-plugin", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"autoload": { | ||
"psr-4": { | ||
"Jinber\\SyliusTinymcePlugin\\": "src/" | ||
} | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "langziyang", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": {} | ||
} |
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,5 @@ | ||
sylius_ui: | ||
events: | ||
sylius.admin.product.update.javascripts: | ||
blocks: | ||
jinber_tinymce_javascript: "@JinberSyliusTinymcePlugin/admin/product/javascript.html.twig" |
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,3 @@ | ||
imports: | ||
- { resource: 'admin/admin_ui.yaml' } | ||
- { resource: 'shop/sylius_ui.yaml'} |
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,3 @@ | ||
jinber_sylius_tinymce_admin: | ||
resource: '../../src/Controller' | ||
type: annotation |
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,7 @@ | ||
services: | ||
_defaults: | ||
autowire: true | ||
autoconfigure: true | ||
public: true | ||
|
||
Jinber\SyliusTinymcePlugin\Controller\FileManagerController: ~ |
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,9 @@ | ||
sylius_ui: | ||
events: | ||
sylius.shop.product.show.tab_details: | ||
blocks: | ||
description: '@JinberSyliusTinymcePlugin/shop/Show/Tabs/Details/_description.html.twig' | ||
|
||
sylius.shop.product.show.right_sidebar: | ||
blocks: | ||
short_description: '@JinberSyliusTinymcePlugin/shop/Show/_shortDescription.html.twig' |
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,31 @@ | ||
// eslint-disable-next-line no-undef | ||
tinymce.init({ | ||
selector: 'textarea', | ||
plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons', | ||
menubar: 'file edit view insert format tools table help', | ||
toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl', | ||
image_advtab: true, | ||
importcss_append: true, | ||
file_picker_callback(callback) { | ||
// eslint-disable-next-line no-undef | ||
tinymce.activeEditor.windowManager.openUrl({ | ||
title: 'Files', | ||
url: '/admin/jinber/tinymce/file_list', | ||
onMessage(api, detail) { | ||
callback(detail.message.src); | ||
// eslint-disable-next-line no-undef | ||
tinymce.activeEditor.windowManager.close(); | ||
}, | ||
}); | ||
}, | ||
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]', | ||
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]', | ||
height: 600, | ||
image_caption: true, | ||
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable', | ||
noneditable_class: 'mceNonEditable', | ||
// toolbar_mode: 'sliding', | ||
contextmenu: 'link image table', | ||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }', | ||
convert_urls: false, | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
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,3 @@ | ||
This is where language files should be placed. | ||
|
||
Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.