<commit_before>/**
 * plugin.js
 *
 * Released under LGPL License.
 * Copyright (c) 2015 SIRAP SAS All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

/*global tinymce:true */

tinymce.PluginManager.add('tabulation', function(editor) {

	editor.on('keydown', function(e) {
		// Check for tab but not ctrl/cmd+tab since it switches browser tabs
		if (e.keyCode != 9 || tinymce.util.VK.metaKeyPressed(e)) {
			return;
		}

		e.preventDefault();

		editor.insertContent('&nbsp; &nbsp; &nbsp; &nbsp;');
		console.log(editor.selection.getStart());
		console.log(editor.dom.getParent(editor.selection.getStart()));
		if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {

			if (e.shiftKey) {<commit_msg>add todo comments<commit_after>/**
 * plugin.js
 *
 * Released under LGPL License.
 * Copyright (c) 2015 SIRAP SAS All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

/*global tinymce:true */

tinymce.PluginManager.add('tabulation', function(editor) {

	editor.on('keydown', function(e) {
		// Check for tab but not ctrl/cmd+tab since it switches browser tabs
		if (e.keyCode != 9 || tinymce.util.VK.metaKeyPressed(e)) {
			return;
		}

		e.preventDefault();

		/**
		 * todo
		 * - configure indentation content with tinymce getParam()
		 */
		function indentSelection(){
			editor.insertContent('&nbsp; &nbsp; &nbsp; &nbsp;');
		}

		/**
		 * todo
		 * - INDENT/OUTDENT IF shift
		 * - INDENT IN START OF LINE
		 */
		function outdentSelection(){
			// todo
		}

		if (editor.dom.getParent(editor.selection.getStart(), 'p')) {

			if (e.shiftKey) {
{'fraction_non_alphanumeric': 0.15992970123022848, 'fraction_numerical': 0.005858230814294083, 'mean_word_length': 3.641304347826087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4952566', 'n_tokens_mistral': 655, 'n_tokens_neox': 576, 'n_words': 125}