mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
Remove custom abcjs types (#1024)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
47f5e7653b
commit
8a2d26f718
2 changed files with 7 additions and 15 deletions
|
@ -19,8 +19,9 @@ export const AbcFrame: React.FC<AbcFrameProps> = ({ code }) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const actualContainer = container.current
|
const actualContainer = container.current
|
||||||
import(/* webpackChunkName: "abc.js" */ 'abcjs').then((imp) => {
|
import(/* webpackChunkName: "abc.js" */ 'abcjs')
|
||||||
imp.renderAbc(actualContainer, code)
|
.then((imp) => {
|
||||||
|
imp.renderAbc(actualContainer, code, {})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.error('error while loading abcjs')
|
console.error('error while loading abcjs')
|
||||||
|
|
9
src/external-types/abcjs/abcjs.d.ts
vendored
9
src/external-types/abcjs/abcjs.d.ts
vendored
|
@ -1,9 +0,0 @@
|
||||||
/*
|
|
||||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
|
||||||
*/
|
|
||||||
|
|
||||||
declare module 'abcjs' {
|
|
||||||
export function renderAbc(target: string | HTMLElement, code: string)
|
|
||||||
}
|
|
Loading…
Reference in a new issue