Skip to content

Commit

Permalink
editor improve
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Apr 13, 2017
1 parent 2881653 commit aa4cfd9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/build/assets/js/scripts.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/build/rev-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"assets/css/styles.css": "assets/css/styles-7f78904947.css",
"assets/js/api.js": "assets/js/api-7e40a02c6c.js",
"assets/js/editor.js": "assets/js/editor-7c1634df3a.js",
"assets/js/scripts.js": "assets/js/scripts-c767913903.js"
"assets/js/scripts.js": "assets/js/scripts-38a3201cfc.js"
}
2 changes: 2 additions & 0 deletions resources/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@
text: '问答话题的标题必须带问号❓',
type: "error",
confirmButtonText: "我知道了"
}).then(function() {
$(".submit-btn").text('提交').removeClass('disabled').prop('disabled', false);
}).catch(swal.noop);
} else if (cid == Config.qa_category_id) {

Expand Down
31 changes: 30 additions & 1 deletion resources/views/topics/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,36 @@
delay: 5000,
unique_id: "topic_content{{ isset($topic) ? $topic->id : '' }}"
},
forceSync: true
forceSync: true,
tabSize: 4,
toolbar: [
"bold", "italic", "heading", "|", "quote", "code", "table",
"horizontal-rule", "unordered-list", "ordered-list", "|",
"link", "image", "|", "side-by-side", 'fullscreen', "|",
{
name: "guide",
action: function customFunction(editor){
var win = window.open('//tiicle.com/items/14/efficient-record-guide', '_blank');
if (win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Browser has blocked it
alert('Please allow popups for this website');
}
},
className: "fa fa-info-circle",
title: "高效记录指南!",
},
{
name: "publish",
action: function customFunction(editor){
$('#topic-submit').click();
},
className: "fa fa-paper-plane",
title: "发布文章",
}
],
});
inlineAttachment.editors.codemirror4.attach(simplemde.codemirror, {
Expand Down

0 comments on commit aa4cfd9

Please sign in to comment.