mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Remove keys from replacers (#539)
This commit is contained in:
parent
63b24fa5bf
commit
e58e53a116
20 changed files with 77 additions and 78 deletions
|
@ -4,10 +4,10 @@ import { ComponentReplacer } from '../ComponentReplacer'
|
|||
import { ImageFrame } from './image-frame'
|
||||
|
||||
export class ImageReplacer extends ComponentReplacer {
|
||||
public getReplacement (node: DomElement, index: number): React.ReactElement | undefined {
|
||||
public getReplacement (node: DomElement): React.ReactElement | undefined {
|
||||
if (node.name === 'img' && node.attribs) {
|
||||
return <ImageFrame
|
||||
key={index}
|
||||
|
||||
id={node.attribs.id}
|
||||
className={node.attribs.class}
|
||||
src={node.attribs.src}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue