Moving from datatables.js to Editor?

Moving from datatables.js to Editor?

timothygardinitimothygardini Posts: 3Questions: 1Answers: 0

I have a lot of existing datatables using datatables.js. Can I have both DataTables and Editor loaded on one page? I'm getting a lot of errors and I believe it may be because of Datatables.js?

Any suggestions?

Answers

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    You can't use Editor without datatables. Suggest you post codes samples.

  • timothygardinitimothygardini Posts: 3Questions: 1Answers: 0

    More or less, I'm trying to clean up my JS files. I've noticed i have Datatable.js and dataTables.editor.js, are both these needed?

    I can't really find a post/comment of what JS is needed for the core functionality of Editor.

  • btreebtree Posts: 99Questions: 14Answers: 11

    Hi,

    for basic usage you need both:

    <link rel="stylesheet" type="text/css" href="DataTables-1.10.9/css/jquery.dataTables.min.css"/>
    <link rel="stylesheet" type="text/css" href="Editor-1.5.1/css/editor.dataTables.min.css"/>
     
    <script type="text/javascript" src="DataTables-1.10.9/js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="Editor-1.5.1/js/dataTables.editor.min.js"></script>
    

    But just use the awesome download page to get only the files you need or even as one simple file!
    https://datatables.net/download/index

    Cheers
    Hannes

  • timothygardinitimothygardini Posts: 3Questions: 1Answers: 0

    Awesome. Just what I needed to know. Thanks for the reply.

  • allanallan Posts: 63,756Questions: 1Answers: 10,510 Site admin

    Yes - this is correct. Editor is a plug-in for DataTables. It fundamentally requires DataTables to be loaded on the same page (and prior to Editor being loaded).

    Editor doesn't provide table display capabilities itself - rather it adds editing abilities to an existing DataTable.

    Allan

This discussion has been closed.