<commit_before>"use strict";

import React         from "react";
import BaseComponent from '../../base_component.jsx';
import TinyMCE       from 'react-tinymce';

export default class SimpleRCE extends BaseComponent {

  constructor(props, state) {
    super(props, state);
  }

  // Don't update because we don't want SimpleRCE to get a new instance
  shouldComponentUpdate(nextProps, nextState) {
    return false;
  }

  config() {
    let config = this.props.config;

    if (config === "simple") {
      return({
        toolbar: false,
        menubar: false,
        statusbar: false,
        elementpath: false,
        forced_root_block : '',
        content_css: '/assets/themes/lumen.css.scss'
      });
    } else if (config === "basic") {
      return({
        toolbar: 'undo redo | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | table bullist numlist link image | code',
        plugins: 'table, code, autoresize',
        autoresize_bottom_margin: 10,
        autoresize_max_height: 500,
        autoresize_min_height: 200,
        menubar: false,
        statusbar: true,
        elementpath: false,
        content_css: '/assets/themes/lumen.css.scss'
      });
    } else {
      return({
        menubar: true,
        statusbar: true,
        elementpath: true
      });
    }
  }

  render() {
    return (
      <TinyMCE
        content={this.props.content}
        config={this.config()}
        onChange={this.props.onChange}
      />
    )

  }

}
<commit_msg>Set min height on SimpleRCE<commit_after>"use strict";

import React         from "react";
import BaseComponent from '../../base_component.jsx';
import TinyMCE       from 'react-tinymce';

export default class SimpleRCE extends BaseComponent {

  constructor(props, state) {
    super(props, state);
  }

  // Don't update because we don't want SimpleRCE to get a new instance
  shouldComponentUpdate(nextProps, nextState) {
    return false;
  }

  config() {
    let config = this.props.config;

    if (config === "simple") {
      return({
        toolbar: false,
        menubar: false,
        statusbar: false,
        elementpath: false,
        min_height: 75,
        forced_root_block : '',
        content_css: '/assets/themes/lumen.css.scss'
      });
    } else if (config === "basic") {
      return({
        toolbar: 'undo redo | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | table bullist numlist link image | code',
        plugins: 'table, code, autoresize',
        min_height: 100,
        autoresize_bottom_margin: 10,
        autoresize_max_height: 500,
        autoresize_min_height: 100,
        menubar: false,
        statusbar: true,
        elementpath: false,
        content_css: '/assets/themes/lumen.css.scss'
      });
    } else {
      return({
        menubar: true,
        statusbar: true,
        elementpath: true
      });
    }
  }

  render() {
    return (
      <TinyMCE
        content={this.props.content}
        config={this.config()}
        onChange={this.props.onChange}
      />
    )

  }

}

{'fraction_non_alphanumeric': 0.11114680372630903, 'fraction_numerical': 0.006745904272406039, 'mean_word_length': 2.2539184952978055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5998117', 'n_tokens_mistral': 978, 'n_tokens_neox': 934, 'n_words': 234}