Two editors in the same HTML page

Two editors in the same HTML page

zipperzipper Posts: 35Questions: 9Answers: 0
edited March 2017 in Free community support

Is this possible? I have two tables and both allow editing. But none of bellow worked for the sub_editor. they all failed at the first line (sub_editor.create/edit/remove). The main editor works fine with very similar code.

    $('a.sub_editor_create').on('click', function (e) {
      sub_editor.create({
        title: 'Create new record',
        buttons: 'Submit'
      });
    });
    $('#table2').on('click', 'a.sub_editor_edit', function (e) {
      sub_editor.edit($(this).closest('tr'), {
        title: 'Edit Record',
        buttons: 'Submit'
      });
    });
    $('#table2').on('click', 'a.sub_editor_delete', function (e) {
      sub_editor.remove($(this).closest('tr'), {
        title: 'Delete Record',
        message: 'Are you sure you wish to remove this record?',
        buttons: 'Submit'
      });
    });

Answers

  • zipperzipper Posts: 35Questions: 9Answers: 0

    Sorry my bad. I fixed it. this is not related to two editors in the same HTML page but related to a typo byt the IDE did not recognized.

This discussion has been closed.