//https://www.tiny.cloud/docs/tinymce/latest/content-formatting/
//https://www.tiny.cloud/docs/tinymce/latest/available-toolbar-buttons/

pimcore.document.editables.wysiwyg = pimcore.document.editables.wysiwyg || {};
pimcore.document.editables.wysiwyg.defaultEditorConfig = {
	style_formats : [
		{ title: 'Tlačítko - rámeček', inline: 'a', classes: 'btn' },
		{ title: 'Tlačítko - výplň', inline: 'a', classes: 'btn btn-fill' },
		{ title: 'Tlačítko - bílé', inline: 'a', classes: 'btn btn-fill-light' },
		{ title: 'Tenké písmo', inline: 'span', classes: 'text-normal' },
		{ title: 'Tučné písmo', inline: 'span', classes: 'text-bold' }
	],
	plugins: 'link anchor image table charmap media code lists wordcount',
	toolbar1: 'cut copy paste pastetext | undo redo | link unlink anchor | image table hr charmap media | code',
	toolbar2: 'styles | alignleft aligncenter alignright | bold italic strikethrough removeformat | bullist numlist | blockquote',
	iframe_template_callback: (data) => {
		const width = data.width ?? 400,
			height = data.height ?? 300,
			source = data.source ?? '',
			allowfullscreen = data.allowfullscreen ?? true;

		return '<div class="video-iframe"><figure>'
			+ '<iframe width="' + width + '" height="' + height + '" src="' + source + '" allowfullscreen="' + allowfullscreen + '"></iframe>'
			+ '</figure></div>';
	}
};
