diff --git a/ground/views/articles/edit.php b/ground/views/articles/edit.php
index 874d6dd..a32c99e 100644
--- a/ground/views/articles/edit.php
+++ b/ground/views/articles/edit.php
@@ -25,8 +25,9 @@
-
-
+
+
+
@@ -43,25 +44,28 @@
-
+
= self::renderPartial('modals/articleInfo.php', array(), true) ?>
diff --git a/ground/views/modals/articleInfo.php b/ground/views/modals/articleInfo.php
index ced4ba4..e589ac3 100644
--- a/ground/views/modals/articleInfo.php
+++ b/ground/views/modals/articleInfo.php
@@ -34,6 +34,10 @@
**жирный** |
жирный |
+
+ | _подчеркивание_ |
+ подчеркивание |
+
| -- |
— |
diff --git a/public/css/articleEdit.css b/public/css/articleEdit.css
index 7c18e8c..df7502d 100644
--- a/public/css/articleEdit.css
+++ b/public/css/articleEdit.css
@@ -1,4 +1,3 @@
-/*body {overflow-y: scroll;}*/
#inputHeader {width: 100%;}
#inputHeader div.form-group {width: 100%;}
input#articleTitle {font-size: 30px;font-weight: 600;height: 45px; border-radius: 0;}
@@ -8,14 +7,8 @@ input#articleTitle {font-size: 30px;font-weight: 600;height: 45px; border-radius
.nopaddingy {padding-bottom: 0;padding-top: 0;}
#articleText {border-radius:0;}
-#articleText {
- width: 100%;
- -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
- box-sizing: border-box; /* Opera/IE 8+ */
-}
-/*#monitor {background-color: white; overflow-y: scroll; padding: 5px 10px; border: solid 1px #ccc; border-radius: 0px;}*/
+#articleText {width: 100%;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;font-family: monospace;color: #fffbec;background-color: #1e1e1e;}
#monitor {height: 100%; width: 100%; background-color: white; overflow-y: scroll; padding: 5px 10px; border: solid 1px #ccc; border-radius: 0px;}
#photobankContainer {position: absolute; top: 0; right: 0px; width: 675px; background-color: rgba(55,55,55, 0.8); overflow-y: scroll; height: 100%;}
-#photobankContainer {display: none;}
\ No newline at end of file
+#photobankContainer {display: none;}
diff --git a/public/js/articleEdit.js b/public/js/articleEdit.js
index ed421cb..fb592ad 100644
--- a/public/js/articleEdit.js
+++ b/public/js/articleEdit.js
@@ -44,10 +44,19 @@ function markItalic()
markdown();
}
+function markUnderline()
+{
+ wrapText('articleText', '_', '_');
+ markdown();
+}
+
function insertPoint()
{
- insertAtCursor('articleText', '[#' + prompt('Укажите номер точки', '') + '|ссылка на точку]');
- markdown();
+ pointId = prompt('Укажите номер точки', '');
+ if (pointId) {
+ insertAtCursor('articleText', '[#' + pointId + '|ссылка на точку]');
+ markdown();
+ }
}
function insertAtCursor(myFieldId, myValue) {
@@ -107,6 +116,13 @@ $('#articleText').keyup(function () {
$(document).ready(function () {
markdown();
$('#articleText').focus();
+ $(document).keyup(function (e) {
+ if (e.keyCode == 27) { // escape key maps to keycode `27`
+ if ($('#photobankContainer').css('display') == 'block') {
+ togglePhotobank();
+ }
+ }
+ });
});
function togglePhotobank()