-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from condorheroblog/master
- Loading branch information
Showing
10 changed files
with
94 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/extensions/column/multilple-column.md → docs/extensions/column/multiple-column.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
description: Multilple Column | ||
description: Multiple Column | ||
|
||
next: | ||
text: Iframe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
description: Internationalization | ||
|
||
next: | ||
text: Alignment | ||
link: /extensions/align/text-align.md | ||
--- | ||
|
||
# Internationalization (i18n) | ||
|
||
The editor provides built-in internationalization support, with English as the default language. | ||
|
||
## Usage | ||
|
||
```javascript | ||
// Import the locale object | ||
import { locale } from 'reactjs-tiptap-editor' | ||
// Set the language to English | ||
locale.setLang('en') | ||
// End | ||
``` | ||
|
||
## Supported Languages | ||
|
||
Currently, the editor supports the following languages: | ||
|
||
| Language | Config | Version | | ||
|--------------------|--------|----------------------------------------------------------------------------------| | ||
| English | en | [v0.0.5](https://github.com/hunghg255/reactjs-tiptap-editor/releases/tag/v0.0.5) | | ||
| Vietnamese | vi | | | ||
| Simplified Chinese | zh_CN | | | ||
|
||
## Adding a New Language | ||
|
||
If the platform doesn't support your desired language, you can add a custom language, for example: `fr`. | ||
|
||
```javascript | ||
// Don't worry about which content to translate; setMessage supports TypeScript | ||
locale.setMessage('fr', { | ||
'editor.remove': 'Supprimer' | ||
// ... | ||
}) | ||
``` | ||
|
||
### Overriding Default Language | ||
|
||
To override part of the current language system, first choose a new language name, then import the default language data, and finally override the translations you want. | ||
|
||
```javascript | ||
import { en } from 'reactjs-tiptap-editor' | ||
locale.setMessage("en_US", { | ||
...en, | ||
"editor.remove": "Delete" | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"main": "./lib/reactjs-tiptap-editor.cjs", | ||
"module": "./lib/reactjs-tiptap-editor.js", | ||
"types": "./lib/index.d.ts", | ||
"description": "A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React", | ||
"packageManager": "[email protected]", | ||
"exports": { | ||
".": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters