|
1 | | -/* |
| 1 | +/** |
2 | 2 | * @copyright Copyright (c) 2019 Julius Härtl <[email protected]> |
3 | 3 | * |
4 | 4 | * @author Julius Härtl <[email protected]> |
5 | 5 | * |
6 | | - * @license GNU AGPL version 3 or any later version |
| 6 | + * @license AGPL-3.0-or-later |
7 | 7 | * |
8 | 8 | * This program is free software: you can redistribute it and/or modify |
9 | 9 | * it under the terms of the GNU Affero General Public License as |
|
18 | 18 | * You should have received a copy of the GNU Affero General Public License |
19 | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | * |
21 | | -*/ |
| 21 | + */ |
22 | 22 |
|
23 | 23 | /* eslint-disable import/no-named-as-default */ |
24 | 24 | import History from '@tiptap/extension-history' |
25 | 25 | import Placeholder from '@tiptap/extension-placeholder' |
26 | 26 | /* eslint-enable import/no-named-as-default */ |
27 | 27 |
|
28 | 28 | import TrailingNode from './nodes/TrailingNode.js' |
| 29 | +import EmojiListWrapper from './components/EmojiListWrapper.vue' |
29 | 30 | import EditableTable from './nodes/EditableTable.js' |
| 31 | +import MentionSuggestion from './components/Mention/suggestion.js' |
| 32 | + |
| 33 | +import tippy from 'tippy.js' |
| 34 | +import 'proxy-polyfill' |
| 35 | + |
30 | 36 | import { Editor } from '@tiptap/core' |
31 | | -import { Emoji, Markdown, Mention, PlainText, RichText } from './extensions/index.js' |
| 37 | +import { VueRenderer } from '@tiptap/vue-2' |
32 | 38 | import { translate as t } from '@nextcloud/l10n' |
| 39 | +import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji.js' |
33 | 40 | import { listLanguages, registerLanguage } from 'lowlight/lib/core.js' |
34 | 41 | import { emojiSearch } from '@nextcloud/vue/dist/Functions/emoji.js' |
35 | 42 | import { VueRenderer } from '@tiptap/vue-2' |
36 | | -import EmojiListWrapper from './components/EmojiListWrapper.vue' |
| 43 | +import EmojiList from './components/EmojiList.vue' |
37 | 44 | import MentionSuggestion from './components/Mention/suggestion.js' |
38 | 45 | import tippy from 'tippy.js' |
39 | 46 |
|
40 | | -import 'proxy-polyfill' |
| 47 | +import { logger } from './helpers/logger.js' |
| 48 | +import { Emoji, Markdown, Mention, PlainText, RichText } from './extensions/index.js' |
41 | 49 |
|
42 | 50 | const loadSyntaxHighlight = async (language) => { |
43 | 51 | const list = listLanguages() |
44 | | - console.info(list) |
| 52 | + logger.debug('Supported languages', { list }) |
45 | 53 | if (!listLanguages().includes(language)) { |
46 | 54 | try { |
47 | 55 | // eslint-disable-next-line n/no-missing-import |
48 | 56 | const syntax = await import(/* webpackChunkName: "highlight/[request]" */'highlight.js/lib/languages/' + language) |
49 | 57 | registerLanguage(language, syntax.default) |
50 | | - } catch (e) { |
51 | | - // No matching highlighing found, fallback to none |
52 | | - console.debug(e) |
| 58 | + } catch (error) { |
| 59 | + // fallback to none |
| 60 | + logger.debug('No matching highlighing found', { error }) |
53 | 61 | } |
54 | 62 | } |
55 | 63 | } |
|
0 commit comments