diff --git a/editor/src/index.js b/editor/src/index.js index f9740da..11573f5 100644 --- a/editor/src/index.js +++ b/editor/src/index.js @@ -14,7 +14,11 @@ import getCaretCoordinates from './caret-position' import moment from 'moment' import PrismJS from 'prismjs' import 'prismjs/components/prism-php' +import 'prismjs/components/prism-go' +import 'prismjs/components/prism-perl' +import 'prismjs/components/prism-css' import 'prismjs/components/prism-markup-templating' +import 'prismjs/components/prism-jq' import './styles.scss'; import '../node_modules/jquery-contextmenu/dist/jquery.contextMenu.css'; @@ -174,14 +178,16 @@ $(document).on('popup:selected', '#autocomplete', function (event, linkName, res }) if (holder) { - const MD = new MarkdownIt() + const MD = new MarkdownIt({ + linkify: true + }) MD.use(MarkdownItWikilinks({ baseURL: holder.dataset.baseUrl, uriSuffix: '', relativeBaseURL: '/edit/', htmlAttributes: { class: 'wiki-link' - } + }, })).use(MarkdownItMark) const options = { @@ -317,6 +323,7 @@ if (holder) { } if (searchEnabled && event.key === 'Escape') { searchEnabled = false + return false; } let value = input.value