Skip to content

Commit

Permalink
Ctrl+Iでのアイコン挿入
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 27, 2021
1 parent 0e5e2bb commit c6ef388
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
}
})

0 comments on commit c6ef388

Please sign in to comment.