添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi Community,

I have a problem regarding generic javascript views and the import of a js-file
(I know that this seems to be asked alot - but from the previous answers I do not seem to get it to work :frowning: )
Maybe someone has an idea what I am doing wrong…

Example workflow of some of my tries:
tabulator example.knwf (264.2 KB)

E.g.:
Hi Alexander, It seems that including the content of the library in the knime_template.js did not work. Just so you know, I got an error after the login (when the main page was being loaded), which for me indicates that it has to do with the loading of the file (and not my workflow). require.js:5 Uncaught Error: Mismatched anonymous define() module: function(){return ... For reference, I am trying to use the Mermaid JS library Is this something we can check via the support? ->trying the same lib as @KnimeWorker - not sure if he got it to work or not :thinking:
Hi Everyone, I want to use a third party library combined with the generic JavaScript view: However I am not sure how to add them to the node roll_eyes Normally I would just include it through: link href=“dist/css/tabulator.min.css” rel=“stylesheet”> script type=“text/javascript” src=“dist/js/tabulator.min.js”> However KNIME does not seem to access the local files in the script Is there some function like the “Additional Libraries” from the java snippet node? For the CSS file I thi…

I tried to include the js file through a flow variable, though copy&paste and different getscript ways:

  • jQuery.ajax({
    url: ‘ https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.4.3/js/tabulator.min.js ’,
    dataType: ‘script’,
    success: function () {
  • -$.getScript(‘ https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.4.3/js/tabulator.min.js ’, function()

    -var js = document.createElement(“script”);

    js.type = “text/javascript”;
    js.src = “ https://cdnjs.cloudflare.com/ajax/libs/tabulator/4.4.3/js/tabulator.min.js ”;

    js.onload = function() {

    However every time I try it seems like the script is not executed or not at the right time :frowning:
    When inspecting I always get the following error:

    When doing it in a simple html file - it works just fine
    tabulator.txt (1.5 KB)

    In general the import of js seems overly complicated with the generic javascript view :sweat:
    …or I am just too stupid to see what I have to do :see_no_evil:

    Hi @AnotherFraudUser ,

    Here is a working example for Tabulator (using the same principle as the workflow that solved my issue).

    JS Library.knwf (343.5 KB)

    Cheers!
    Matheus