Skip to content

Commit 947e1e8

Browse files
committed
Revised readme for JSON clarification
Signed-off-by: Marty Friedel <1491079+martyf@users.noreply.github.com>
1 parent e026211 commit 947e1e8

4 files changed

Lines changed: 35 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
All notable changes to `statamic-tinymce-cloud` will be documented in this file
4+
5+
## 1.0.1 - 2021-01-01
6+
7+
## What's fixed
8+
9+
- Improved documentation regarding JSON validation of defaults
10+
- Clean up of `tinymce-cloud.vue`
11+
12+
## 1.0.0 - 2020-12-23
13+
14+
## What's new
15+
16+
- Initial release

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ configuration. When you add the fieldtype to a Blueprint or Fieldset, this confi
6666
and you can then adjust on a field usage basis. In other words, one Blueprint could have a fully-featured editor, while
6767
another Blueprint could have a slimmed down feature set.
6868

69+
**Important Note**: outside of Statamic, your TinyMCE Configuration Object is just a JavaScript object. However, to take
70+
advantage of JSON validation within Statamic, you need to ensure your configuration is valid JSON - the most common
71+
point is to ensure double quotes are used (instead of single quotes). Currently the JSON validation is only on the
72+
defaults due to Statamic validation processes for fieldtypes, however validating here against JSON can help prevent
73+
mistakes in your configuration. Run your configuration through a JSON validator (such
74+
as [JSON Lint](https://jsonlint.com/)) to check your syntax.
75+
6976
![TinyMCE default configuration in Statamic 3](https://github.com/mitydigital/statamic-tinymce-cloud/blob/master/docs/tinymce-cloud-configuration.png?raw=true)
7077

7178
Refer to [TinyMCE's documentation](https://www.tiny.cloud/docs/) for full configuration options.
@@ -91,10 +98,17 @@ definition URLs are publicly accessible, and either relative to the site's root
9198
```javascript
9299
{
93100
// ...
94-
"external_plugins": {
95-
"my_plugin_name": "/plugins/my_plugin_name/plugin.min.js"
96-
},
97-
"toolbar": "... my_plugin_name ...",
101+
"external_plugins"
102+
:
103+
{
104+
"my_plugin_name"
105+
:
106+
"/plugins/my_plugin_name/plugin.min.js"
107+
}
108+
,
109+
"toolbar"
110+
:
111+
"... my_plugin_name ...",
98112
// ...
99113
}
100114
```

resources/dist/js/tinymce-cloud.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/components/tinymce-cloud.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ export default {
2020
init() {
2121
return this.meta.init;
2222
}
23-
},
24-
methods: {
25-
removeHttps() {
26-
console.log('we are updating');
27-
}
2823
}
2924
};
3025
</script>

0 commit comments

Comments
 (0)