diff --git a/templates/index.html b/templates/index.html
index b88d009..49ede2c 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,325 +1,403 @@
-
+
+
+
+
+
+
+
+
Папки
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- const protocolIcons = {
- 'rustdesk': '
',
- 'anydesk': '
',
- 'ammyy': '
',
- 'teamviewer': '
',
- 'vnc': '
',
- 'rdp': '
'
- };
+
+
+
+
Редактировать заметку
+
+
+
+
+
+
+
+
+
- const protocolLinks = {
- 'rustdesk': 'rustdesk://',
- 'anydesk': 'anydesk://',
- 'ammyy': 'ammyy://',
- 'teamviewer': 'teamviewer://remote-control/',
- 'vnc': 'vnc://',
- 'rdp': 'rdp://'
- };
+
\ No newline at end of file
+
+ function formatItalic() {
+ const textarea = $('#note-textarea');
+ const start = textarea[0].selectionStart;
+ const end = textarea[0].selectionEnd;
+ const text = textarea.val();
+ const selected = text.substring(start, end);
+ const newText = `*${selected}*`;
+ textarea.val(text.substring(0, start) + newText + text.substring(end));
+ textarea[0].selectionStart = start;
+ textarea[0].selectionEnd = start + newText.length - 2;
+ }
+
+ function formatLink() {
+ const textarea = $('#note-textarea');
+ const start = textarea[0].selectionStart;
+ const end = textarea[0].selectionEnd;
+ const text = textarea.val();
+ const selected = text.substring(start, end) || 'текст';
+ const url = prompt('Введите URL ссылки:', 'https://example.com');
+ if (url) {
+ const newText = `[${selected}](${url})`;
+ textarea.val(text.substring(0, start) + newText + text.substring(end));
+ textarea[0].selectionStart = start;
+ textarea[0].selectionEnd = start + newText.length - (selected ? 0 : '[текст]'.length);
+ }
+ }
+
+
+