Skip to content

Commit 8226707

Browse files
committed
first commit
0 parents  commit 8226707

File tree

106 files changed

+29354
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+29354
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
phpunit.phar
3+
/vendor
4+
composer.phar
5+
composer.lock
6+
*.project
7+
.idea/

LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Jens Segers
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Summernote editor extension for laravel-admin
2+
======
3+
4+
这是一个`laravel-admin`扩展,用来将`Summernote`集成进`laravel-admin`的表单中
5+
6+
## 截图
7+
8+
![wx20180905-132310](https://user-images.githubusercontent.com/1479100/45072743-f1d92b00-b10e-11e8-9a51-9397fa4fb24e.png)
9+
10+
## 安装
11+
12+
```bash
13+
composer require laravel-admin-ext/summernote
14+
```
15+
16+
然后
17+
```bash
18+
php artisan vendor:publish --tag=laravel-admin-summernote
19+
```
20+
21+
## 配置
22+
23+
`config/admin.php`文件的`extensions`,加上属于这个扩展的一些配置
24+
```php
25+
26+
'extensions' => [
27+
28+
'summernote' => [
29+
30+
// 如果要关掉这个扩展,设置为false
31+
'enable' => true,
32+
33+
// 编辑器的配置
34+
'config' => [
35+
36+
]
37+
]
38+
]
39+
40+
```
41+
42+
编辑器的配置可以到[Summernote文档](https://summernote.org/getting-started/)找到,比如配置语言和高度
43+
```php
44+
'config' => [
45+
'lang' => 'zh-CN',
46+
'hegiht' => 500,
47+
]
48+
```
49+
50+
## 使用
51+
52+
在form表单中使用它:
53+
```php
54+
$form->summernote('content')->rules('require');
55+
```
56+
57+
## 支持
58+
59+
如果觉得这个项目帮你节约了时间,不妨支持一下;)
60+
61+
![-1](https://cloud.githubusercontent.com/assets/1479100/23287423/45c68202-fa78-11e6-8125-3e365101a313.jpg)
62+
63+
License
64+
------------
65+
Licensed under [The MIT License (MIT)](LICENSE).

composer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "laravel-admin-ext/summernote",
3+
"description": "Summernote extension for laravel-admin",
4+
"type": "library",
5+
"keywords": ["laravel-admin", "extension", "editor"],
6+
"homepage": "https://github.com/laravel-admin-ext/summernote",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "song",
11+
"email": "[email protected]"
12+
}
13+
],
14+
"require": {
15+
"php": ">=7.0.0",
16+
"laravel/framework": "5.5.*",
17+
"encore/laravel-admin": ">=1.5.20"
18+
},
19+
"require-dev": {
20+
"phpunit/phpunit": "~6.0",
21+
"laravel/laravel": "5.*"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Encore\\Summernote\\": "src/"
26+
}
27+
},
28+
"extra": {
29+
"laravel": {
30+
"providers": [
31+
"Encore\\Summernote\\SummernoteServiceProvider"
32+
]
33+
34+
}
35+
}
36+
}
8.87 KB
Binary file not shown.
8.69 KB
Binary file not shown.
15.3 KB
Binary file not shown.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
(function($) {
2+
$.extend($.summernote.lang, {
3+
'ar-AR': {
4+
font: {
5+
bold: 'عريض',
6+
italic: 'مائل',
7+
underline: 'تحته خط',
8+
clear: 'مسح التنسيق',
9+
height: 'إرتفاع السطر',
10+
name: 'الخط',
11+
strikethrough: 'فى وسطه خط',
12+
subscript: 'مخطوطة',
13+
superscript: 'حرف فوقي',
14+
size: 'الحجم'
15+
},
16+
image: {
17+
image: 'صورة',
18+
insert: 'إضافة صورة',
19+
resizeFull: 'الحجم بالكامل',
20+
resizeHalf: 'تصغير للنصف',
21+
resizeQuarter: 'تصغير للربع',
22+
floatLeft: 'تطيير لليسار',
23+
floatRight: 'تطيير لليمين',
24+
floatNone: 'ثابته',
25+
shapeRounded: 'الشكل: تقريب',
26+
shapeCircle: 'الشكل: دائرة',
27+
shapeThumbnail: 'الشكل: صورة مصغرة',
28+
shapeNone: 'الشكل: لا شيء',
29+
dragImageHere: 'إدرج الصورة هنا',
30+
dropImage: 'إسقاط صورة أو نص',
31+
selectFromFiles: 'حدد ملف',
32+
maximumFileSize: 'الحد الأقصى لحجم الملف',
33+
maximumFileSizeError: 'تم تجاوز الحد الأقصى لحجم الملف',
34+
url: 'رابط الصورة',
35+
remove: 'حذف الصورة',
36+
original: 'Original'
37+
},
38+
video: {
39+
video: 'فيديو',
40+
videoLink: 'رابط الفيديو',
41+
insert: 'إدراج الفيديو',
42+
url: 'رابط الفيديو',
43+
providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion ou Youku)'
44+
},
45+
link: {
46+
link: 'رابط رابط',
47+
insert: 'إدراج',
48+
unlink: 'حذف الرابط',
49+
edit: 'تعديل',
50+
textToDisplay: 'النص',
51+
url: 'مسار الرابط',
52+
openInNewWindow: 'فتح في نافذة جديدة'
53+
},
54+
table: {
55+
table: 'جدول',
56+
addRowAbove: 'Add row above',
57+
addRowBelow: 'Add row below',
58+
addColLeft: 'Add column left',
59+
addColRight: 'Add column right',
60+
delRow: 'Delete row',
61+
delCol: 'Delete column',
62+
delTable: 'Delete table'
63+
},
64+
hr: {
65+
insert: 'إدراج خط أفقي'
66+
},
67+
style: {
68+
style: 'تنسيق',
69+
p: 'عادي',
70+
blockquote: 'إقتباس',
71+
pre: 'شفيرة',
72+
h1: 'عنوان رئيسي 1',
73+
h2: 'عنوان رئيسي 2',
74+
h3: 'عنوان رئيسي 3',
75+
h4: 'عنوان رئيسي 4',
76+
h5: 'عنوان رئيسي 5',
77+
h6: 'عنوان رئيسي 6'
78+
},
79+
lists: {
80+
unordered: 'قائمة مُنقطة',
81+
ordered: 'قائمة مُرقمة'
82+
},
83+
options: {
84+
help: 'مساعدة',
85+
fullscreen: 'حجم الشاشة بالكامل',
86+
codeview: 'شفيرة المصدر'
87+
},
88+
paragraph: {
89+
paragraph: 'فقرة',
90+
outdent: 'محاذاة للخارج',
91+
indent: 'محاذاة للداخل',
92+
left: 'محاذاة لليسار',
93+
center: 'توسيط',
94+
right: 'محاذاة لليمين',
95+
justify: 'ملئ السطر'
96+
},
97+
color: {
98+
recent: 'تم إستخدامه',
99+
more: 'المزيد',
100+
background: 'لون الخلفية',
101+
foreground: 'لون النص',
102+
transparent: 'شفاف',
103+
setTransparent: 'بدون خلفية',
104+
reset: 'إعادة الضبط',
105+
resetToDefault: 'إعادة الضبط'
106+
},
107+
shortcut: {
108+
shortcuts: 'إختصارات',
109+
close: 'غلق',
110+
textFormatting: 'تنسيق النص',
111+
action: 'Action',
112+
paragraphFormatting: 'تنسيق الفقرة',
113+
documentStyle: 'تنسيق المستند',
114+
extraKeys: 'Extra keys'
115+
},
116+
help: {
117+
'insertParagraph': 'Insert Paragraph',
118+
'undo': 'Undoes the last command',
119+
'redo': 'Redoes the last command',
120+
'tab': 'Tab',
121+
'untab': 'Untab',
122+
'bold': 'Set a bold style',
123+
'italic': 'Set a italic style',
124+
'underline': 'Set a underline style',
125+
'strikethrough': 'Set a strikethrough style',
126+
'removeFormat': 'Clean a style',
127+
'justifyLeft': 'Set left align',
128+
'justifyCenter': 'Set center align',
129+
'justifyRight': 'Set right align',
130+
'justifyFull': 'Set full align',
131+
'insertUnorderedList': 'Toggle unordered list',
132+
'insertOrderedList': 'Toggle ordered list',
133+
'outdent': 'Outdent on current paragraph',
134+
'indent': 'Indent on current paragraph',
135+
'formatPara': 'Change current block\'s format as a paragraph(P tag)',
136+
'formatH1': 'Change current block\'s format as H1',
137+
'formatH2': 'Change current block\'s format as H2',
138+
'formatH3': 'Change current block\'s format as H3',
139+
'formatH4': 'Change current block\'s format as H4',
140+
'formatH5': 'Change current block\'s format as H5',
141+
'formatH6': 'Change current block\'s format as H6',
142+
'insertHorizontalRule': 'Insert horizontal rule',
143+
'linkDialog.show': 'Show Link Dialog'
144+
},
145+
history: {
146+
undo: 'تراجع',
147+
redo: 'إعادة'
148+
},
149+
specialChar: {
150+
specialChar: 'SPECIAL CHARACTERS',
151+
select: 'Select Special characters'
152+
}
153+
}
154+
});
155+
})(jQuery);

resources/assets/dist/lang/summernote-ar-AR.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)