Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2549 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2549 Rev 2569
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { CKEditor } from '@ckeditor/ckeditor5-react'
2
import { CKEditor } from '@ckeditor/ckeditor5-react'
3
import ClassicEditor from '../ckeditor/ClassicEditor'
3
import { FormLabel } from '@mui/material'
4
import 'ckeditor5.css'
4
import 'ckeditor5.css'
Línea -... Línea 5...
-
 
5
 
-
 
6
import ClassicEditor from '../ckeditor/ClassicEditor'
5
 
7
 
-
 
8
export default function Ckeditor({
-
 
9
  id = '',
6
export default function Ckeditor({
10
  label = '',
7
  defaultValue = '',
11
  defaultValue = '',
8
  onChange = () => '',
12
  onChange = () => '',
9
  onReady = () => {}
13
  onReady = () => {}
10
}) {
14
}) {
-
 
15
  return (
-
 
16
    <>
11
  return (
17
      {label ? <FormLabel htmlFor={id}>{label}</FormLabel> : null}
12
    <CKEditor
18
      <CKEditor
13
      editor={ClassicEditor}
19
        editor={ClassicEditor}
14
      onReady={onReady}
20
        onReady={onReady}
15
      data={defaultValue}
21
        data={defaultValue}
-
 
22
        onChange={(event, editor) => onChange(editor.getData())}
-
 
23
        id={id}
16
      onChange={(event, editor) => onChange(editor.getData())}
24
      />
17
    />
25
    </>
18
  )
26
  )