This commit is contained in:
Harry Zhou
2017-06-15 12:27:11 +08:00
17 changed files with 2795 additions and 7 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
View File
@@ -0,0 +1,7 @@
/*!
* froala_editor v2.6.2 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2017 Froala Labs
*/
.clearfix::after{clear:both;display:block;content:"";height:0}.hide-by-clipping{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.fr-view span[style~="color:"] a{color:inherit}.fr-view strong{font-weight:700}.fr-view table{border:0;border-collapse:collapse;empty-cells:show;max-width:100%}.fr-view table.fr-dashed-borders td,.fr-view table.fr-dashed-borders th{border-style:dashed}.fr-view table.fr-alternate-rows tbody tr:nth-child(2n){background:#f5f5f5}.fr-view table td,.fr-view table th{border:1px solid #ddd}.fr-view table td:empty,.fr-view table th:empty{height:20px}.fr-view table td.fr-highlighted,.fr-view table th.fr-highlighted{border:1px double red}.fr-view table td.fr-thick,.fr-view table th.fr-thick{border-width:2px}.fr-view table th{background:#e6e6e6}.fr-view hr{clear:both;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;page-break-after:always}.fr-view .fr-file{position:relative}.fr-view .fr-file::after{position:relative;content:"\1F4CE";font-weight:400}.fr-view pre{white-space:pre-wrap;word-wrap:break-word}.fr-view[dir=rtl] blockquote{border-left:0;border-right:solid 2px #5e35b1;margin-right:0;padding-right:5px;padding-left:0}.fr-view[dir=rtl] blockquote blockquote{border-color:#00bcd4}.fr-view[dir=rtl] blockquote blockquote blockquote{border-color:#43a047}.fr-view blockquote{border-left:solid 2px #5e35b1;margin-left:0;padding-left:5px;color:#5e35b1}.fr-view blockquote blockquote{border-color:#00bcd4;color:#00bcd4}.fr-view blockquote blockquote blockquote{border-color:#43a047;color:#43a047}.fr-view span.fr-emoticon{font-weight:400;font-family:"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;display:inline;line-height:0}.fr-view span.fr-emoticon.fr-emoticon-img{background-repeat:no-repeat!important;font-size:inherit;height:1em;width:1em;min-height:20px;min-width:20px;display:inline-block;margin:-.1em .1em .1em;line-height:1;vertical-align:middle}.fr-view .fr-text-gray{color:#AAA!important}.fr-view .fr-text-bordered{border-top:solid 1px #222;border-bottom:solid 1px #222;padding:10px 0}.fr-view .fr-text-spaced{letter-spacing:1px}.fr-view .fr-text-uppercase{text-transform:uppercase}.fr-view img{position:relative;max-width:100%}.fr-view img.fr-dib{margin:5px auto;display:block;float:none;vertical-align:top}.fr-view img.fr-dib.fr-fil{margin-left:0}.fr-view img.fr-dib.fr-fir{margin-right:0}.fr-view img.fr-dii{display:inline-block;float:none;vertical-align:bottom;margin-left:5px;margin-right:5px;max-width:calc(100% - (2 * 5px))}.fr-view img.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}.fr-view img.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}.fr-view img.fr-rounded{border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.fr-view img.fr-bordered{border:solid 10px #CCC;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fr-view .fr-video{text-align:center;position:relative}.fr-view .fr-video>*{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;max-width:100%;border:0}.fr-view .fr-video.fr-dvb{display:block;clear:both}.fr-view .fr-video.fr-dvb.fr-fvl{text-align:left}.fr-view .fr-video.fr-dvb.fr-fvr{text-align:right}.fr-view .fr-video.fr-dvi{display:inline-block}.fr-view .fr-video.fr-dvi.fr-fvl{float:left}.fr-view .fr-video.fr-dvi.fr-fvr{float:right}.fr-view a.fr-strong{font-weight:700}.fr-view a.fr-green{color:green}.fr-view button.fr-rounded,.fr-view input.fr-rounded,.fr-view textarea.fr-rounded{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.fr-view button.fr-large,.fr-view input.fr-large,.fr-view textarea.fr-large{font-size:24px}a.fr-view.fr-strong{font-weight:700}a.fr-view.fr-green{color:green}img.fr-view{position:relative;max-width:100%}img.fr-view.fr-dib{margin:5px auto;display:block;float:none;vertical-align:top}img.fr-view.fr-dib.fr-fil{margin-left:0}img.fr-view.fr-dib.fr-fir{margin-right:0}img.fr-view.fr-dii{display:inline-block;float:none;vertical-align:bottom;margin-left:5px;margin-right:5px;max-width:calc(100% - (2 * 5px))}img.fr-view.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}img.fr-view.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}img.fr-view.fr-rounded{border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}img.fr-view.fr-bordered{border:solid 10px #CCC;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
+25 -1
View File
@@ -46,7 +46,7 @@
标题
<input type="text" placeholder="Title" name="title">
内容
<textarea rows="4" placeholder="Content" name="content"></textarea>
<textarea id="content" rows="4" placeholder="Content" name="content"></textarea>
<input type="submit" class="button" value="发布公告">
</form>
</div>
@@ -145,4 +145,28 @@
</div>
</div>
<script>
// WYSIWYG
$("textarea#content").froalaEditor({
imageUploadParam: 'source',
imageUploadParams: {
key: "7e945496f2de8cbc710ecca702062e9b",
format: "flea-mart"
},
imageUploadURL: 'https://flimg.neupioneer.com/api/1/upload',
requestWithCORS: true,
pluginsEnabled: ['image', 'link', 'colors', 'emoticons',
'fontSize', 'fontFamily', 'fullscreen'],
toolbarButtonsMD: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
toolbarButtonsSM: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
toolbarButtonsXS: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
height: 300
});
// Hack the License
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').css("opacity", "0");
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').attr("href", "#");
</script>
@endsection
+26 -2
View File
@@ -44,7 +44,7 @@
<label class="right inline">商品描述:</label>
</div>
<div class="small-9 columns">
<textarea name="description" placeholder="商品描述">{{old('description')}}</textarea>
<textarea id="description" name="description" placeholder="商品描述">{!! old('description') !!}</textarea>
</div>
</div>
<div class="row">
@@ -151,6 +151,30 @@
prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
}
}
// WYIWYG Editor
$("textarea#description").froalaEditor({
imageUploadParam: 'source',
imageUploadParams: {
key: "7e945496f2de8cbc710ecca702062e9b",
format: "flea-mart"
},
imageUploadURL: 'https://flimg.neupioneer.com/api/1/upload',
requestWithCORS: true,
pluginsEnabled: ['image', 'link', 'colors', 'emoticons',
'fontSize', 'fontFamily', 'fullscreen'],
toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
toolbarButtonsMD: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
toolbarButtonsSM: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
toolbarButtonsXS: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
height: 250
});
// Hack the License
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').css("opacity", "0");
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').attr("href", "");
</script>
@endsection
@endsection
+19 -1
View File
@@ -54,7 +54,7 @@
<label class="right inline">商品描述:</label>
</div>
<div class="small-9 columns">
<textarea name="description" placeholder="商品描述">{{count($errors) ? old('description') : $good->description}}</textarea>
<textarea id="description" name="description" placeholder="商品描述">{{count($errors) ? old('description') : $good->description}}</textarea>
</div>
</div>
<div class="row">
@@ -166,5 +166,23 @@
prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
}
}
// WYSIWYG
$("textarea#description").froalaEditor({
imageUploadParam: 'source',
imageUploadParams: {
key: "7e945496f2de8cbc710ecca702062e9b",
format: "flea-mart"
},
imageUploadURL: 'https://flimg.neupioneer.com/api/1/upload',
requestWithCORS: true,
pluginsEnabled: ['image', 'link', 'colors', 'emoticons',
'fontSize', 'fontFamily', 'fullscreen'],
toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'align', 'quote', '-',
'insertImage', '|', 'emoticons', 'help', 'fullscreen', '|', 'undo', 'redo'],
height: 250
});
// Hack the License
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').css("opacity", "0");
$('a[href="https://www.froala.com/wysiwyg-editor?k=u"]').attr("href", "#");
</script>
@endsection
+1 -1
View File
@@ -111,7 +111,7 @@
<div class="row">
<div id="asd" class="small-12 medium-12 columns" style="background-color: white">
<h3>商品介绍: </h3>
<p>{{ $good->description }}</p>
<p>{!! $good->description !!}</p>
</div>
</div>
@@ -5,6 +5,6 @@
@section('content')
<h2>{{ $announcement->title }}</h2>
{{ $announcement->content }}
{!! $announcement->content !!}
@endsection
+5 -1
View File
@@ -7,6 +7,9 @@
<link rel="stylesheet" href="/css/foundation.css"/>
<link rel="stylesheet" href="/css/app.css"/>
<link rel="stylesheet" href="/css/cropper.min.css"/>
<link rel="stylesheet" href="/css/froala_editor.min.css">
<link rel="stylesheet" href="/css/froala_editor.pkgd.min.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link type="text/css" media="screen" rel="stylesheet" href="/css/responsive-tables.css" />
@yield('asset')
<script src="/js/jquery.min.js"></script>
@@ -21,6 +24,7 @@
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="/js/jquery.slides.min.js"></script>
<script src="/js/app.js"></script>
<script src="/js/froala_editor.pkgd.min.js"></script>
<title>@yield('title') - 先锋市场</title>
</head>
<body>
@@ -33,4 +37,4 @@
@yield('navbm')
@include('layout.footer')
</body>
</html>
</html>