{"id":9194,"date":"2021-09-09T10:58:26","date_gmt":"2021-09-09T07:58:26","guid":{"rendered":"https:\/\/dhtmlx.com\/blog\/?p=9194"},"modified":"2024-11-01T13:40:56","modified_gmt":"2024-11-01T10:40:56","slug":"whats-new-dhtmlx-code-snippet-tool","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/whats-new-dhtmlx-code-snippet-tool\/","title":{"rendered":"What&#8217;s New in DHTMLX Code Snippet Tool"},"content":{"rendered":"<p>Since its release in July 2020, the code snippet tool has become a great helper to programmers who use DHTMLX JavaScript UI libraries. If you are not familiar with it yet, you can check out the <a href=\"https:\/\/dhtmlx.com\/blog\/announcing-dhtmlx-code-snippet-tool\/\" rel=\"noopener\" target=\"_blank\">release article<\/a>. This handy instrument enables developers to view the JS and HTML code of DHTMLX samples, make modifications, and preview the result. Modified snippets can be easily saved and shared with colleagues for more effective collaboration as well as with our technical support team when the need arises. And now, the DHTMLX development team made the snippet tool even more convenient by introducing several helpful view modes. In this article, we will take a look at the basic mode of the snippet tool and find out how it can be switched into new modes.<\/p>\n<h5>6 available modes<\/h5>\n<h6>Basic mode<\/h6>\n<p>The <a href=\"https:\/\/snippet.dhtmlx.com\/basic\" rel=\"noopener\" target=\"_blank\">DHTMLX snippet tool<\/a> is notable for its intuitive UI. The basic mode is a default view of the snippet. It includes three windows: two windows for JS and HTML code on the left, and a snippet preview window on the right. That&#8217;s how the DHTMLX-based spreadsheet looks like in basic mode.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/basic-1024x483.png\" alt=\"Snippet tool - basic mode\" width=\"1024\" height=\"483\" class=\"aligncenter size-large wp-image-9195\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/basic-1024x483.png 1024w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/basic-300x141.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/basic-768x362.png 768w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/basic.png 1354w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<p>All new viewing modes are enabled in a similar way by adding corresponding endings to the default URL of the snippet tool.<\/p>\n<h6>Wide mode<\/h6>\n<p>If you want to see just the result of code manipulations in DHTMLX components, the wide mode is exactly what you need. It displays the preview window over the entire screen of the snippet tool. Just complement  https:\/\/snippet.dhtmlx.com\/iazmc27w with <em>?mode=wide<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/wide-mode.gif\" alt=\"snippet tool - wide mode\" width=\"999\" height=\"550\" class=\"aligncenter size-full wp-image-9211\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w?mode=wide\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<h6>Mobile mode<\/h6>\n<p>With the mobile mode, you can see how snippets look like on mobile devices. Add <em>?mode=mobile<\/em> to the URL and you got it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/mobile-mode.gif\" alt=\"snippet tool - mobile mode\" width=\"999\" height=\"550\" class=\"aligncenter size-full wp-image-9213\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w?mode=mobile\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<h6>JS mode<\/h6>\n<p>When it is necessary to focus on the JS part of your sample, enter <em>?mode=js<\/em> in the URL and you\u2019ll see only JavaScript code.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/js-mode.gif\" alt=\"snippet tool - js mode\" width=\"999\" height=\"550\" class=\"aligncenter size-full wp-image-9215\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w?mode=js\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<h6>HTML mode<\/h6>\n<p>Want to get a closer look at the structure of a web page containing your sample? Enable the HTML mode by adding <em>?mode=html<\/em>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/html-mode.gif\" alt=\"code snippet tool - html mode\" width=\"999\" height=\"550\" class=\"aligncenter size-full wp-image-9217\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w?mode=html\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<h6>Result mode<\/h6>\n<p>When your snippet is fully completed, it is nice to review the result of your work via the result mode. Actuated with the <em>?mode=result<\/em> ending, it allows you to show the preview window across the whole page and to switch between all modes via tabs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2021\/09\/result-mode.gif\" alt=\"code snippet tool - result mode\" width=\"999\" height=\"550\" class=\"aligncenter size-full wp-image-9219\" \/><a href=\"https:\/\/snippet.dhtmlx.com\/iazmc27w?mode=result\" rel=\"noopener\" target=\"_blank\">Check the sample ><\/a><\/p>\n<h5>Navigation improvement and a new shortcut key<\/h5>\n<p>Apart from new view modes, we improved the snippet tool navigation by moving the toolbar from the right side to a more common place on the left side. It has also become much easier to save your work progress with snippets via a new keyboard shortcut &#8211; CTRL (CMD) + S.<\/p>\n<h5>DHTMLX components available in the code snippet tool<\/h5>\n<p>Besides DHTMLX Suite, so far the code snippet tool provides examples of the following components:<\/p>\n<ul>\n<li><a href=\"https:\/\/snippet.dhtmlx.com\/f3uekgjw?text=Diagram\" rel=\"noopener\" target=\"_blank\">DHTMLX Diagram<\/a><\/li>\n<li><a href=\"https:\/\/snippet.dhtmlx.com\/iit71nct?mode=wide&#038;text=Pivot\" rel=\"noopener\" target=\"_blank\">DHTMLX Pivot<\/a><\/li>\n<li><a href=\"https:\/\/snippet.dhtmlx.com\/6dmccf0l?mode=wide&#038;text=RichText\" rel=\"noopener\" target=\"_blank\">DHTMLX Rich Text Editor<\/a><\/li>\n<li><a href=\"https:\/\/snippet.dhtmlx.com\/atl9gd4h?mode=wide&#038;text=Spreadsheet\" rel=\"noopener\" target=\"_blank\">DHTMLX Spreadsheet<\/a><\/li>\n<li><a href=\"https:\/\/snippet.dhtmlx.com\/ssiegemu?mode=wide&#038;text=Vault\" rel=\"noopener\" target=\"_blank\">DHTMLX Vault<\/a><\/li>\n<\/ul>\n<h5>Final words<\/h5>\n<p>Summarizing the above, we can say that the DHTMLX code snippet tool has become more functional and user-friendly. Following the instructions provided in this article, you can test all new modes implemented in the <a href=\"https:\/\/snippet.dhtmlx.com\/basic\" rel=\"noopener\" target=\"_blank\">snippet tool<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since its release in July 2020, the code snippet tool has become a great helper to programmers who use DHTMLX JavaScript UI libraries. If you are not familiar with &#8230;<\/p>\n","protected":false},"author":101014,"featured_media":9221,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[33,58,16,6,57,61,34,10],"class_list":["post-9194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general","tag-all-posts","tag-diagram","tag-dhtmlxvault","tag-dhtmlxgrid","tag-pivot","tag-richtext","tag-spreadsheet","tag-dhtmlxsuite"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/9194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/101014"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=9194"}],"version-history":[{"count":29,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/9194\/revisions"}],"predecessor-version":[{"id":11334,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/9194\/revisions\/11334"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/9221"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=9194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=9194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=9194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}