Update from 5 to 6



image

is that a mistake in the documentation?



подскажите как обновиться до 6 версии?
Can you tell me how to upgrade to version 6?

это ведь скорее всего не все проблемы с обновлением

also changed the names of css classes, there is no word about it in the documentation…

If you add an edit button and a cancel button, the toolbar gives an error.

Hello.

Thank you for your notes.

  1. About the “margin” property. Thank you for your report. You’re right. There is a mistake in the docs.
    You should use
    editor.diagram.config.margin.x = 100;
    instead of
    editor.diagram.config.margin = 100;
    Here is a working example:
    DHTMLX Snippet Tool
    We’ll fix this typo in the near future.

  2. undo/redo buttons
    If I understood you correctly You are trying to add the custom undo/redo buttons to the editor menu.
    Please, note that these buttons are already presented in the “edit” menu section:
    изображение
    while you are already using this section it in your config, so these duplicating items have conflict.
    So, you should try to assign unique ids to that new undo/red items:

			items: [
				"edit",
				{ type: "undo", id: "custom-undo" },
				{ type: "redo", id: "custom-redo" },
			]

https://snippet.dhtmlx.com/9mzrg4tb
or remove the original undo/redo items from the “edit” section

			items: [
				{type: "edit", items:[
                    //"undo",
                    //"redo",
                    //"separator",
                    "duplicate",
                    "copy",
                    "paste",
                    "separator",
                    "copyStyle",
                    "pasteStyle",
                    "separator",
                    "selectAll",
                    "selectNone"
                ]},
				"undo",
				"redo",
			]

https://snippet.dhtmlx.com/kqhwg80v

If you add an edit button and a cancel button, the toolbar gives an error.

Could you please, clarify your issue with some code snippet?