JS files for these components aren't included in the lib package and should be taken:
<script src="https://cdn.webix.com/components/edge/ckeditor/ckeditor.js"></script>
The Webix library supports integration with popular graphic tools with the help of its own components. For now, the following graphic tools can be included:
To embed either tool into your web page, you should link not only to Webix, but also to a special JavaScript file from the components folder. This file will connect you to the desired tool and load files required for it.
Note that in documentation samples files are linked in another way, but in your apps you should follow the patterns described further in this article.
You can set path to sources of the necessary graphic tool on CDN. Actually, there are three ways to do that:
You can download JS file for the Konva JS tool from github.
Konva is an HTML5 Canvas JavaScript framework that extends the 2D context by enabling canvas interactivity for desktop and mobile applications.
Learn more about Konva.js library
Related sample: Konva JS graphic tool
Include the framework into your HTML page
<script type="text/javascript" src="./konva.js"></script>
Instantiate it as follows:
webix.ui({
view:"konva",
ready:function(){...};
});
If you want to use Konva JS configuration, get the Konva object with the help of the getStage() method.
const konva = $$("konva1").getStage();
The method has the optional waitStage parameter. If it is set tu true, the method returns a promise, which allows you to wait till the tool is ready and then use its properties. For example:
$$("konva1").getStage(true).then(function(stage){
// stage is the Konva object
});
You can download JS file for the Paper JS tool from github.
Paper.js is an open source vector graphics scripting framework that runs on top of the HTML5 Canvas.
Learn more about Paper.js library
Related sample: Paper JS graphic tool
Besides the library itself, you need to link a js file with necessary PaperScript and associate it with a related canvas specified by the canvas property.
PaperScript code is loaded using the < script > tag and the type being set to "text/paperscript". The code can either be in an external file (src="URL"), or be inline. Read the details in the Paper.js documentation.
Include the library into your HTML page:
<!-- Load the Paper.js library -->
<script type="text/javascript" src="./paper.js"></script>
<!-- Load external PaperScript and associate it with canvasB -->
<script type="text/paperscript" src="./paperballs.js" canvas="canvasB"></script>
Create a tool instance as follows:
webix.ui({
view:"paper",
canvas:"canvasB"
});