2 ckeditors in one row not working

2 ckeditors in one row not working

mediahillsmediahills Posts: 3Questions: 1Answers: 0

With one ckeditor in row everything is working.
But if I add 2 ckeditors in one row I can edit only the first row of the table.
Code is like

  var editorFields = [{
      label: ' en:',
      name: "content_en",
      type: 'ckeditorClassic'          
    }, {
      label: ' fr:',
      name: "content_fr",
      type: 'ckeditorClassic'         
    }
  ];

If I click any other but first row I get error:

Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at qa.set (datacontroller.js:306)
at Qg.setData (dataapimixin.js:21)
at Editor.set (editor.ckeditor.js:106)
at Editor.Field._typeFn (dataTables.editor.js:789)
at Editor.Field.set (dataTables.editor.js:603)
at Editor.Field._multiValueCheck (dataTables.editor.js:757)
at Editor.Field.multiSet (dataTables.editor.js:557)
at Object.<anonymous> (dataTables.editor.js:5037)
at Function.each (jquery.js:665)

This question has an accepted answers - jump to answer

Answers

  • mediahillsmediahills Posts: 3Questions: 1Answers: 0

    fixed it by adding val check in editor.ckeditor

            set: function ( conf, val ) {
                if (!val) val = '';
                conf._ckeditor.setData( val );
            },
    
  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @mediahills ,

    Would you be able to link to your page, or modify this test case to demonstrate the issue, please?

    Cheers,

    Colin

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin
    Answer ✓

    Interesting - so is the value null that you are feeding into CKEditor from the table?

    Allan

  • mediahillsmediahills Posts: 3Questions: 1Answers: 0

    Yes, the problem was in null values in my data, there was no problem with editor.

    Thank you.

This discussion has been closed.