<commit_before># Trix: A Rich Text Editor for Everyday Writing

**Compose beautifully formatted text in your web application.** Trix is an editor for writing messages, comments, articles, and lists—the simple documents most web apps are made of. It features a sophisticated document model, support for embedded attachments, and outputs terse and consistent HTML.

Trix is an open-source project from [Basecamp](https://basecamp.com/), the creators of [Ruby on Rails](http://rubyonrails.org/). Millions of people write in Basecamp every day, and we built Trix to give them the best possible editing experience. See Trix in action in the [all-new Basecamp 3](https://basecamp.com/3-is-coming).

## Built for the Modern Web

Trix is built with emerging web standards, notably [Custom Elements](http://www.w3.org/TR/custom-elements/), [Mutation Observer](https://dom.spec.whatwg.org/#mutation-observers), and [Promises](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects).

Eventually we expect all browsers to implement these standards. In the meantime, Trix includes [polyfills](https://en.wikipedia.org/wiki/Polyfill) for missing functionality.

## Supported Browsers

Trix supports all evergreen, self-updating desktop browsers: Chrome, Safari, Firefox, and Internet Explorer 11 and up. It works great on mobile, too: Safari on iOS 8 and above, and Chrome on Android 4 and above.

# Installation

Include the bundled `trix.css` and `trix.js` files in the `<head>` of your page.

```html
<head>
  …
  <link rel="stylesheet" type="text/css" href="trix.css">
  <script type="text/javascript" src="trix.js"></script>
</head>
```

`trix.css` includes default styles for the Trix toolbar, editor, and attachments. Skip this file if you prefer to define these styles yourself.

To use your own polyfills, or to target only browsers that support all of the required standards, include `trix-core.js` instead.

# Basic Usage

Put an empty `<trix-editor></trix-editor>` tag on the page. Trix will automatically insert a separate `<trix-toolbar>` before the editor.

Like an HTML `<textarea>`, `<trix-editor>` accepts `autofocus` and `placeholder` attributes.

Like any block-level element, `<trix-editor>` expands vertically to fit its contents. You can specify `min-height`, `max-height`, or `height` in your page’s CSS to size the editor appropriately.

## Integrating With Forms
<commit_msg>Consolidate polyfill and browser support paragraphs<commit_after># Trix: A Rich Text Editor for Everyday Writing

**Compose beautifully formatted text in your web application.** Trix is an editor for writing messages, comments, articles, and lists—the simple documents most web apps are made of. It features a sophisticated document model, support for embedded attachments, and outputs terse and consistent HTML.

Trix is an open-source project from [Basecamp](https://basecamp.com/), the creators of [Ruby on Rails](http://rubyonrails.org/). Millions of people write in Basecamp every day, and we built Trix to give them the best possible editing experience. See Trix in action in the [all-new Basecamp 3](https://basecamp.com/3-is-coming).

## Built for the Modern Web

Trix is built with emerging web standards, notably [Custom Elements](http://www.w3.org/TR/custom-elements/), [Mutation Observer](https://dom.spec.whatwg.org/#mutation-observers), and [Promises](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-promise-objects). Eventually we expect all browsers to implement these standards. In the meantime, Trix includes [polyfills](https://en.wikipedia.org/wiki/Polyfill) for missing functionality.

Trix supports all evergreen, self-updating desktop browsers: Chrome, Safari, Firefox, and Internet Explorer 11 and up. It works great on mobile, too: Safari on iOS 8 and above, and Chrome on Android 4 and above.

# Installation

Include the bundled `trix.css` and `trix.js` files in the `<head>` of your page.

```html
<head>
  …
  <link rel="stylesheet" type="text/css" href="trix.css">
  <script type="text/javascript" src="trix.js"></script>
</head>
```

`trix.css` includes default styles for the Trix toolbar, editor, and attachments. Skip this file if you prefer to define these styles yourself.

To use your own polyfills, or to target only browsers that support all of the required standards, include `trix-core.js` instead.

# Basic Usage

Put an empty `<trix-editor></trix-editor>` tag on the page. Trix will automatically insert a separate `<trix-toolbar>` before the editor.

Like an HTML `<textarea>`, `<trix-editor>` accepts `autofocus` and `placeholder` attributes.

Like any block-level element, `<trix-editor>` expands vertically to fit its contents. You can specify `min-height`, `max-height`, or `height` in your page’s CSS to size the editor appropriately.

## Integrating With Forms

{'fraction_non_alphanumeric': 0.10231980115990058, 'fraction_numerical': 0.0033140016570008283, 'mean_word_length': 4.8533333333333335, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, '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': '1606718', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1318, 'n_words': 593}