<commit_before>'use strict'
import React from 'react'
import { langs } from 'i18n/lang'
import $script from 'scriptjs'
let TextBox = class extends React.Component {
  constructor(props) {
    super(props)
    this.state = { editable: false }
  }
  componentWillUnmount() {
    super.componentWillUnmount && super.componentWillUnmount()
    delete this.editor
  }
  onDoubleClick = ev => {
    let reactEle = this
    this.setState({ editable: true })
    this.props.setDraggable(false)
    if (this.editor) {
      return
    }
    $script.ready('ckeditor', () => {
      let editor = (this.editor = window.CKEDITOR.inline(
        this.refs.editableContent,<commit_msg>use lang chosen by user for ckeditor<commit_after>'use strict'
import React from 'react'
import { langs } from 'i18n/lang'
import $script from 'scriptjs'
let TextBox = class extends React.Component {
  constructor(props) {
    super(props)
    this.state = { editable: false }
  }
  componentWillUnmount() {
    super.componentWillUnmount && super.componentWillUnmount()
    delete this.editor
  }
  onDoubleClick = ev => {
    let reactEle = this
    this.setState({ editable: true })
    this.props.setDraggable(false)
    if (this.editor) {
      return
    }
    $script.ready('ckeditor', () => {
      window.CKEDITOR.config.language = this.props.language
      let editor = (this.editor = window.CKEDITOR.inline(
        this.refs.editableContent,
{'fraction_non_alphanumeric': 0.11806043569922699, 'fraction_numerical': 0.0028109627547434997, 'mean_word_length': 3.2762762762762763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3097196', 'n_tokens_mistral': 450, 'n_tokens_neox': 445, 'n_words': 101}