Skip to content

Commit

Permalink
Merge pull request #805 from valadas/jodit-typeof-config
Browse files Browse the repository at this point in the history
Use tyeof instead of importing type
  • Loading branch information
valadas authored Aug 21, 2023
2 parents eaf9ae6 + 57d53d0 commit 8a9276a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/stencil-library/custom-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@
"kind": "field",
"name": "options",
"type": {
"text": "DnnRichtextConfig"
"text": "Config"
},
"description": "Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html",
"required": false
Expand Down
1 change: 0 additions & 1 deletion packages/stencil-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"gh-pages": "^5.0.0",
"jest": "^27.0.3",
"jest-cli": "^27.5.1",
"jodit": "^3.24.9",
"license-checker-rseidelsohn": "^4.2.6",
"lit": "^2.7.2",
"npm-run-all": "^4.1.5",
Expand Down
6 changes: 2 additions & 4 deletions packages/stencil-library/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { IRoleGroup } from "./components/dnn-permissions-grid/role-group-interfa
import { IRole } from "./components/dnn-permissions-grid/role-interface";
import { ILocalization } from "./components/dnn-permissions-grid/localization-interface";
import { ISearchedUser } from "./components/dnn-permissions-grid/searched-user-interface";
import { DnnRichtextConfig } from "./components/dnn-richtext/dnn-richtext-config";
import { DnnToggleChangeEventDetail } from "./components/dnn-toggle/toggle-interface";
export { ColorInfo } from "./utilities/colorInfo";
export { DropzoneResx } from "./components/dnn-dropzone/types";
Expand All @@ -21,7 +20,6 @@ export { IRoleGroup } from "./components/dnn-permissions-grid/role-group-interfa
export { IRole } from "./components/dnn-permissions-grid/role-interface";
export { ILocalization } from "./components/dnn-permissions-grid/localization-interface";
export { ISearchedUser } from "./components/dnn-permissions-grid/searched-user-interface";
export { DnnRichtextConfig } from "./components/dnn-richtext/dnn-richtext-config";
export { DnnToggleChangeEventDetail } from "./components/dnn-toggle/toggle-interface";
export namespace Components {
interface DnnButton {
Expand Down Expand Up @@ -337,7 +335,7 @@ export namespace Components {
/**
* Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html
*/
"options": DnnRichtextConfig;
"options": typeof Jodit.defaultOptions;
/**
* Sets the value of the content of the editor.
*/
Expand Down Expand Up @@ -1057,7 +1055,7 @@ declare namespace LocalJSX {
/**
* Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html
*/
"options"?: DnnRichtextConfig;
"options"?: typeof Jodit.defaultOptions;
/**
* Sets the value of the content of the editor.
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, Host, h, Prop, Event, EventEmitter, Watch } from '@stencil/core';
import { Jodit } from "jodit";
import { DnnRichtextConfig } from "./dnn-richtext-config";
import { decodeHtml } from '../../utilities/stringUtilities';

@Component({
Expand All @@ -10,10 +9,10 @@ import { decodeHtml } from '../../utilities/stringUtilities';
})
export class DnnRichtext {
/** Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html */
@Prop() options: DnnRichtextConfig;
@Prop() options: typeof Jodit.defaultOptions;
private textArea: HTMLTextAreaElement;
private editor: Jodit;
private dnnDefaultOptions: DnnRichtextConfig = {
private dnnDefaultOptions: typeof Jodit.defaultOptions = {
...Jodit.defaultOptions,
useSplitMode: true,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

## Properties

| Property | Attribute | Description | Type | Default |
| --------- | --------- | ---------------------------------------------------------------------------------------------- | ------------------- | ----------- |
| `options` | -- | Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html | `DnnRichtextConfig` | `undefined` |
| `value` | `value` | Sets the value of the content of the editor. | `string` | `undefined` |
| Property | Attribute | Description | Type | Default |
| --------- | --------- | ---------------------------------------------------------------------------------------------- | -------- | ----------- |
| `options` | -- | Optional configuration for Jodit, see https://xdsoft.net/jodit/docs/classes/config.Config.html | `Config` | `undefined` |
| `value` | `value` | Sets the value of the content of the editor. | `string` | `undefined` |


## Events
Expand Down

0 comments on commit 8a9276a

Please sign in to comment.