Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Table buttons throwing error #282

Open
jeanAsvestas opened this issue Jan 9, 2025 · 1 comment
Open

Bug: Table buttons throwing error #282

jeanAsvestas opened this issue Jan 9, 2025 · 1 comment

Comments

@jeanAsvestas
Copy link

jeanAsvestas commented Jan 9, 2025

Bug with tables

Jodit Version: 4.1.2

Browser: all
OS: Windows
Is React App: True

Code:

import React, { useMemo, useRef } from 'react'
import JoditEditor from 'jodit-react'
import './RichTextEditor.css'

interface RichTextEditorProps {
  initialValue: string
  onChange: (content: string) => void
}

const RichTextEditor: React.FC<RichTextEditorProps> = ({
  initialValue,
  onChange,
}) => {
  const editor = useRef(null)

  const config = useMemo(
    () => ({
      readonly: false,
      placeholder: 'Population result details...',
      style: {
        fontSize: '16px',
        fontStyle: 'Inter',
      },
      height: '40dvh',
      // iframe: true,
      toolbar: true,
      spellcheck: true,
      language: 'en',
      allowResizeY: false,
      toolbarAdaptive: false,
      showCharsCounter: false,
      showWordsCounter: false,
      showXPathInStatusbar: false,
      askBeforePasteHTML: true,
      askBeforePasteFromWord: true,
      buttons: [
        // 'source',
        'bold',
        'strikethrough',
        'underline',
        'italic',
        '|',
        'ul',
        'ol',
        '|',
        'outdent',
        'indent',
        '|',
        'font',
        'fontsize',
        'brush',
        'paragraph',
        '|',
        'table',
        'link',
        '|',
        'align',
        'undo',
        'redo',
        '|',
        'hr',
        'eraser',
        ,
      ],
      removeButtons: ['file', 'xpath'],
    }),
    []
  )

  return (
    <div className="listComponent">
      <JoditEditor
        ref={editor}
        value={initialValue}
        config={config}
        onBlur={content => onChange(content)}
      />
    </div>
  )
}

export default RichTextEditor

When i press the green buttons, they should open the dropdown options that are also the same to their respective yellow buttons. So the user can add columns/rows or delete them.

image

Instead, i get the following error. If i try to use the yellow buttons, it works just fine and doesn't throw the error.

image

@siddk10
Copy link

siddk10 commented Jan 16, 2025

This issue is resolved in [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants