tinymce-solid 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,18 +5,18 @@
5
5
  [![ci](https://github.com/thednp/tinymce-solid/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/tinymce-solid/actions/workflows/ci.yml)
6
6
  [![Npm Version](https://img.shields.io/npm/v/tinymce-solid)](https://www.npmjs.com/package/tinymce-solid)
7
7
  [![solid-js version](https://img.shields.io/badge/solid--js-1.8.17-brightgreen)](https://solidjs.com/)
8
- [![tinymce version](https://img.shields.io/badge/tinymce-7.1.1-brightgreen)](https://www.tiny.cloud/)
8
+ [![tinymce version](https://img.shields.io/badge/tinymce-7.1.2-brightgreen)](https://www.tiny.cloud/)
9
9
  [![typescript version](https://img.shields.io/badge/typescript-5.4.5-brightgreen)](https://www.typescriptlang.org/)
10
- [![prettier version](https://img.shields.io/badge/prettier-3.3.0-brightgreen)](https://prettier.io/)
11
- [![vite version](https://img.shields.io/badge/vite-5.2.12-brightgreen)](https://github.com/vitejs)
10
+ [![prettier version](https://img.shields.io/badge/prettier-3.3.1-brightgreen)](https://prettier.io/)
11
+ [![vite version](https://img.shields.io/badge/vite-5.2.13-brightgreen)](https://github.com/vitejs)
12
12
 
13
13
  ## About
14
14
 
15
15
  This package is a wrapper around [TinyMCE](https://github.com/tinymce/tinymce) to make it easier to use in a SolidJS / SolidStart application.
16
16
 
17
17
  - If you need detailed documentation on TinyMCE, see: [TinyMCE Documentation](https://www.tiny.cloud/docs/tinymce/7/).
18
- - This is a community developed package forked from the TinyMCE React, see: [Official TinyMCE React](https://github.com/tinymce/tinymce-react) for more information.
19
- - For our quick demos, check out the [demo](https://thednp.github.io/tinymce-solid/).
18
+ - This is a community developed package forked from the TinyMCE React, see: [Official TinyMCE React](https://github.com/tinymce/tinymce-react).
19
+ - For a quick test, check out the [demo](https://thednp.github.io/tinymce-solid/).
20
20
 
21
21
  ## Quick Start Guide
22
22
 
@@ -48,8 +48,8 @@ In your usual SolidJS SPA you can use **tinymce-solid** component like this.
48
48
 
49
49
  ```tsx
50
50
  import { createSignal } from "solid-js";
51
- import { TinyMCE, Editor } from "tinymce";
52
- import { SolidEditor } from "tinymce-solid";
51
+ import { type Editor } from "tinymce";
52
+ import { SolidEditor as Editor } from "tinymce-solid";
53
53
 
54
54
  export default function App() {
55
55
  let editorRef!: Editor;
@@ -57,7 +57,7 @@ export default function App() {
57
57
 
58
58
  return (
59
59
  <main>
60
- <SolidEditor
60
+ <Editor
61
61
  apiKey="your-api-key"
62
62
  value={content()}
63
63
  onInit={(_content: string, editor: Editor) => (editorRef = editor)}
@@ -87,17 +87,17 @@ When using SolidStart in SSR mode, you may want to bring the `clientOnly` loader
87
87
  ```tsx
88
88
  import { clientOnly } from "@solidjs/start";
89
89
  import { Component, createSignal } from "solid-js";
90
- import { TinyMCE, Editor } from "tinymce";
90
+ import { type Editor } from "tinymce";
91
91
  import { type IAllProps } from "tinymce-solid";
92
92
 
93
- const SolidEditor = clientOnly<Component<IAllProps>>(() => import("tinymce-solid"));
93
+ const Editor = clientOnly<Component<IAllProps>>(() => import("tinymce-solid"));
94
94
 
95
95
  export default function App() {
96
96
  const [content, setContent] = createSignal("");
97
97
 
98
98
  return (
99
99
  <main>
100
- <SolidEditor
100
+ <Editor
101
101
  apiKey="your-api-key"
102
102
  value={content()}
103
103
  init={{
@@ -125,15 +125,15 @@ export default function App() {
125
125
  * *disabled*: **reactive** - toggles the `disabled` property of the editor
126
126
  * *value*: **reactive** - the actual content;
127
127
  * *initialValue*: **reactive** - the initial content value;
128
- * *onEditorChange*: `(content: string, editor: Editor)` - the callback you can use to update the parent state;
128
+ * *onEditorChange*: `(content: string, editor: Editor) => void` - the callback you can use to update the parent state;
129
129
  * all other TinyMCE properties are non-reactive and should work as designed for the original TinyMCE React component.
130
130
 
131
131
 
132
132
  ### Some notes
133
133
 
134
- - This package will automatically load the tinymce library and its dependencies by the use of the `tinymceScriptSrc` property
135
- - You can make use of the dark mode via TinyMCE skins:<br />`<SolidEditor skin="oxide-dark" contentCss="dark" {...props} />`, this very demo is configured to make use of them
136
- - The component, like the original, allows you to hook into the TinyMCE instance via an `editorRef` reference.
134
+ - This package will automatically load the tinymce library and its dependencies by the use of the `tinymceScriptSrc` property;
135
+ - You can make use of the dark mode via TinyMCE skins: `skin="oxide-dark"` and `contentCss="dark"` properties, this very demo is configured to make use of them via `createEffect`;
136
+ - Like the original React adaptation, this component allows you to hook into the TinyMCE instance via an `editorRef` reference.
137
137
 
138
138
  ## Issues
139
139