Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributing

External contributors are free to submit PRs against the `main` branch.

In order for Tiny to accept your contribution, we will need legal permission from you to use your code. Please email `legal@tiny.cloud` with the subject `CLA request for [your Github username]`. Our legal team will send you a Contributors License Agreement (CLA) which you will need to sign and return.
67 changes: 54 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,66 @@

## About

This package is a thin wrapper around [TinyMCE](https://github.com/tinymce/tinymce)
to make it easier to use in jQuery.
Official jQuery integration for TinyMCE, the rich text editor. It adds a custom `.tinymce()` function to jQuery so an editor can be initialized by invoking `$(<selector>).tinymce()`. By default, it pulls TinyMCE from the Tiny Cloud CDN unless configured to use a different setup, such as self-hosting the [tinymce NPM package](https://www.npmjs.com/package/tinymce).

The jQuery integration used to be included with the default TinyMCE bundle,
starting with TinyMCE 6 it has been removed from the TinyMCE bundle and will
instead be distributed as an independent npm package.
## Quickstart

* If you need detailed documentation on TinyMCE, see:
[TinyMCE Documentation](https://www.tiny.cloud/docs/).
* For the TinyMCE jQuery Quick Start, see:
[TinyMCE Documentation - jQuery Integration](https://www.tiny.cloud/docs/tinymce/8/jquery-cloud/).
* For our quick demos, check out the TinyMCE jQuery
[Storybook](https://tinymce.github.io/tinymce-jquery/).
### Cloud CDN

1. [Sign up for a Tiny Cloud account](https://www.tiny.cloud/pricing/) to receive a Tiny Cloud API key.
1. Then in your project:
1. Include the following script tags to load jQuery, TinyMCE, and the jQuery integration:

### Issues
```html
<script
src="https://code.jquery.com/jquery-4.0.0.min.js"
integrity="sha256-OaVG6prZf4v69dPg6PhVattBXkcOWQB62pdZ3ORyrao="
crossorigin="anonymous"
></script>
<script
src="https://cdn.tiny.cloud/1/your-api-key/tinymce/8/tinymce.min.js"
referrerpolicy="origin"
></script>
<script src="https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery/dist/tinymce-jquery.min.js"></script>
Comment thread
tiny-ben-tran marked this conversation as resolved.
Resolved
```
1. Add a `textarea` to target and initialize the editor:

Have you found an issue with tinymce-jquery or do you have a feature request?
```html
<textarea id="tiny"><p>Welcome to TinyMCE jQuery!</p></textarea>

<script>
$('textarea#tiny').tinymce({
api_key: 'your-api-key',
plugins: 'lists link image table code help wordcount'
});
</script>
```
1. Update the `your-api-key` placeholders to include your Tiny Cloud API key.

For more information: [Using TinyMCE with jQuery - Cloud CDN](https://www.tiny.cloud/docs/tinymce/latest/jquery-cloud/)

### Self hosted via NPM package

Using TinyMCE from NPM in a jQuery project requires a couple of extra steps. See the documentation for more information: [Using TinyMCE with jQuery - Self hosted via NPM](https://www.tiny.cloud/docs/tinymce/latest/jquery-pm/)

## Demos

For our quick demos, check out the TinyMCE jQuery [Storybook](https://tinymce.github.io/tinymce-jquery/).

## Detailed documentation

* [TinyMCE Documentation](https://www.tiny.cloud/docs/tinymce/latest/).

## Issues

Have you found an issue with `tinymce-jquery` or do you have a feature request?
Open up an [issue](https://github.com/tinymce/tinymce-jquery/issues) and let us
know or submit a [pull request](https://github.com/tinymce/tinymce-jquery/pulls).
*Note: For issues concerning TinyMCE please visit the
[TinyMCE repository](https://github.com/tinymce/tinymce).*

## License

`tinymce-jquery` is licensed under the MIT License. See the LICENSE.txt file for details.

Depending on use case, the TinyMCE core editor can be used under either GPL-2.0-or-later or a commercial license. See the [tinymce package](https://www.npmjs.com/package/tinymce) for details.
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"name": "@tinymce/tinymce-jquery",
"version": "2.3.1-rc",
"description": "Official TinyMCE integration for jQuery",
"version": "2.3.0-rc",
Comment thread
tiny-ben-tran marked this conversation as resolved.
Resolved
"description": "Official jQuery integration for TinyMCE rich text editor.",
"keywords": [
"tinymce",
"jquery",
"editor",
"wysiwyg",
"rich-text-editor",
"html",
"javascript"
],
"main": "dist/tinymce-jquery.js",
"files": [
"dist",
Expand All @@ -24,7 +33,7 @@
"deploy-storybook": "yarn storybook-to-ghpages --source-branch=main"
},
"repository": "https://github.com/tinymce/tinymce-jquery",
"author": "Tiny Technologies",
"author": "Ephox Corporation DBA Tiny Technologies, Inc.",
"license": "MIT",
"devDependencies": {
"@ephox/agar": "^7.4.1",
Expand Down
Loading