Skip to content

How to select buttons for inline toolbar from table cell #306

@cataopriscila

Description

@cataopriscila

Version: "jodit-react": "^5.2.19",

I'm trying to select which toolbar buttons I can select for the table cell popup. All toolbarInline props only works with the text selection option. Am I missing something? I tried to overwrite the table popup however nothing changes:

const config = useMemo(
  () => ({
    readonly: false,
    placeholder: placeholder || 'Type here...',
    width: '100%',
    buttons: ['bold', 'italic', 'ul', 'ol', 'table', 'undo', 'redo', 'paragraph'],
    controls: {
      paragraph: {
        list: Jodit.atom({
          h2: 'Title 1',
          h3: 'Title 2',
          h4: 'Title 3',
          h5: 'Body',
        }),
      },
    },
    popup: {
        selection: Jodit.atom([
          'bold',
          'italic',
          'ul',
          'ol',
          'paragraph',
          'table',
          'link',
          'spellcheck',
          'source',
        ]),
        tableCell: Jodit.atom([
          'tableInsertRowAbove',
          'tableInsertRowBelow',
          'tableInsertColumnLeft',
          'tableInsertColumnRight',
          'tableDeleteRow',
          'tableDeleteColumn',
          // Removed 'cellBackground', 'cellVerticalAlign', 'cellSplit', 'cellMerge'
        ]),
      },
    uploader: { insertImageAsBase64URI: true },
    showXPathInStatusbar: false,
    showCharsCounter: false,
    showWordsCounter: false,
    toolbarAdaptive: false,
    toolbarSticky: true,
  }),
  [placeholder]
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions