How can we import "Datatables Editor" files in TypeScript file (SharePoint Framework Webpart)

How can we import "Datatables Editor" files in TypeScript file (SharePoint Framework Webpart)

Waqas JamilWaqas Jamil Posts: 2Questions: 1Answers: 0
edited May 2021 in Free community support

Hi DataTables Community
How can we import "Datatables Editor" files in TypeScript file this is the main file of my SharePoint Framework Webpart created by choosing "No Javascript Framework".
1. I'm going to provide an online file uploader link off my main (.ts) file https://gofile.io/d/bNSb8W
2. I have already download and install the trial version of DataTable Editor 5th option (JS + CSS) using npm in node_modules according to instructions from here
https://editor.datatables.net/download/
3. and implement a Basic initialisation Example from here https://editor.datatables.net/examples/simple/simple.html
means just add HTML code in render method and JavaScript code in addDataTable method in main (.ts) file as mentioned above.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,433Questions: 1Answers: 10,049 Site admin
    Answer ✓

    You should be able to use:

    import {
        Editor,
        Field,
        Format,
        IDtError,
        IDtRequest,
        IDtResponse,
        Mjoin,
        Options,
        Validate,
    } from 'datatables.net-editor-server';
    

    or if you prefer:

    import * as EditorLib from 'datatables.net-editor-server';
    

    and then EditorLib.Editor etc.

    Allan

  • Waqas JamilWaqas Jamil Posts: 2Questions: 1Answers: 0

    Thanks Allan

This discussion has been closed.