function insertCodeSample(editor, language, code) {
		editor.undoManager.transact(function() {
			var node = getSelectedCodeSample(editor);

			code = DOM.encode(code);

			if (node) {
				editor.dom.setAttrib(node, 'class', 'language-' + language);
				node.innerHTML = code;
				Prism.highlightElement(node);
				editor.selection.select(node);
			} else {
				editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
				editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
			}
		});
	}
Contains all dialog logic.

@class tinymce.codesample.Dialog
@private