Comparing version 0.12.1 to 1.0.0
{ | ||
"name": "trix", | ||
"version": "0.12.1", | ||
"version": "1.0.0", | ||
"description": "A rich text editor for everyday writing", | ||
@@ -5,0 +5,0 @@ "main": "dist/trix.js", |
@@ -215,2 +215,13 @@ # Trix | ||
### Inserting a Content Attachment | ||
Content attachments are self-contained units of HTML that behave like files in the editor. They can be moved or removed, but not edited directly, and are represented by a single character position in the document model. | ||
To insert HTML as an attachment, create a `Trix.Attachment` with a `content` attribute and call the `editor.insertAttachment` method. The HTML inside a content attachment is not subject to Trix’s document conversion rules and will be rendered as-is. | ||
```js | ||
var attachment = new Trix.Attachment({ content: '<span class="mention">@trix</span>' }) | ||
element.editor.insertAttachment(attachment) | ||
``` | ||
### Inserting a Line Break | ||
@@ -334,2 +345,4 @@ | ||
* `trix-before-initialize` fires when the `<trix-editor>` element is attached to the DOM just before Trix installs its `editor` object. | ||
* `trix-initialize` fires when the `<trix-editor>` element is attached to the DOM and its `editor` object is ready for use. | ||
@@ -336,0 +349,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
432228
1805
0
396