From c6ef388467aad1c4e9a221bb26d3b3ea41d07a7e Mon Sep 17 00:00:00 2001 From: sapphi-red Date: Mon, 27 Sep 2021 22:17:40 +0900 Subject: [PATCH] =?UTF-8?q?Ctrl+I=E3=81=A7=E3=81=AE=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E6=8C=BF=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index 1ce9f5a443..5a5dabbb4f 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -81,6 +81,8 @@ import { emojifyImageDir } from './lib/editor/constants' import modeType from './lib/modeType' import appState from './lib/appState' +import * as utils from './lib/editor/utils' + require('../vendor/showup/showup') require('../css/index.css') @@ -3385,3 +3387,11 @@ window.addEventListener('message', event => { $iframe.height = height }) }) + +// Ctrl+Iでのアイコン挿入 +editor.addKeyMap({ + 'Ctrl-I': cm => { + const userStamp = `:@${personalInfo.name}:` + utils.insertText(cm, userStamp, userStamp.length) + } +})