<commit_before>;
if (typeof AC ==="undefined") {AC = function(){}};
if (typeof AC.Crud ==="undefined") {AC.Crud = function(){}};
if (typeof AC.Crud.Edit ==="undefined") {AC.Crud.Edit = function(){}};

AC.Crud.Edit.Text = function() {
	
	var addCKEditor = function(elm) {
		
		// release instances, we need this if pages are loaded with AJAX to
		// make sure no conflict with previous instances occur
		CKEDITOR.instances = {};
		
		elm.ckeditor( function() { /* callback code */ }, {
			skin : 'kama',
			toolbar : 'Ajde',
			format_tags : 'p;h1;h2;h3;pre',
			width : elm.width(),
			height : elm.height()
		});
		
	};
	
	return {
		
		init: function() {
			
			CKEDITOR.config.toolbar_Ajde =
			[
				{ name: 'basicstyles',	items : [ 'Format','Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
				{ name: 'paragraph',	items : [ 'NumberedList','BulletedList','-','Outdent','Indent' ] },
				{ name: 'links',		items : [ 'Link','Unlink' ] },
				{ name: 'insert',		items : [ 'Image','Table','SpecialChar' ] },
				{ name: 'tools',		items : [ 'Maximize', 'ShowBlocks','Source' ] }
			];
			
			CKEDITOR.config.baseHref = document.getElementsByTagName('base')[0].href;

			// Optional configuration
//			CKEDITOR.config.extraPlugins = 'autogrow'
//			CKEDITOR.config.resize_enabled = false;
//			CKEDITOR.config.autoGrow_maxHeight = '600';
//			CKEDITOR.config.removePlugins = 'elementspath,contextmenu';			
//			CKEDITOR.config.toolbarCanCollapse = false;
			
			addCKEditor($('form.ACCrudEdit textarea:not(.noRichText)'));
		}
		
	};
}();<commit_msg>ckeditor for v4 compat<commit_after>;
if (typeof AC ==="undefined") {AC = function(){}};
if (typeof AC.Crud ==="undefined") {AC.Crud = function(){}};
if (typeof AC.Crud.Edit ==="undefined") {AC.Crud.Edit = function(){}};

AC.Crud.Edit.Text = function() {

	var addCKEditor = function(elm) {

		// release instances, we need this if pages are loaded with AJAX to
		// make sure no conflict with previous instances occur
		CKEDITOR.instances = {};

		elm.ckeditor( function() { /* callback code */ }, {
			toolbar : 'Ajde',
			format_tags : 'p;h1;h2;h3;pre',
			width : elm.width(),
			height : elm.height()
		});

	};

	return {

		init: function() {

			CKEDITOR.config.toolbar_Ajde =
			[
				{ name: 'basicstyles',	items : [ 'Format','Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
				{ name: 'paragraph',	items : [ 'NumberedList','BulletedList','-','Outdent','Indent' ] },
				{ name: 'links',		items : [ 'Link','Unlink' ] },
				{ name: 'insert',		items : [ 'Image','Table','SpecialChar' ] },
				{ name: 'tools',		items : [ 'Maximize', 'ShowBlocks','Source' ] }
			];

			CKEDITOR.config.baseHref = document.getElementsByTagName('base')[0].href;
			CKEDITOR.config.forcePasteAsPlainText = true;

			// Optional configuration
//			CKEDITOR.config.extraPlugins = 'autogrow'
//			CKEDITOR.config.resize_enabled = false;
//			CKEDITOR.config.autoGrow_maxHeight = '600';
//			CKEDITOR.config.removePlugins = 'elementspath,contextmenu';
//			CKEDITOR.config.toolbarCanCollapse = false;

			addCKEditor($('form.ACCrudEdit textarea:not(.noRichText)'));
		}

	};
}();
{'fraction_non_alphanumeric': 0.19498432601880877, 'fraction_numerical': 0.004702194357366771, 'mean_word_length': 3.849544072948328, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4334638', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1109, 'n_words': 203}