Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip #38

Merged
merged 15 commits into from
Sep 16, 2024
Merged

wip #38

Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update readme
  • Loading branch information
Williamug committed Sep 16, 2024
commit db1ff30a111dcdb3c04959097a08f51a8d3a07ed
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ You can customize the toolbar by passing an array of tool names to the toolbar c

The code below demonstrates how to configure the toolbar:
```js
const editor = MaxiEditor.create('#editor', {
const editor = MaxiEditor.set('#editor', {
toolbar: ['bold', 'italic', 'underline'],
height: '500px'
});
Expand All @@ -144,7 +144,7 @@ editor.setWidth('800px');
Include and configure plugins. After installing the plugin, you should include it in the toolbar array to enable it on the toolbar.

```js
const editor = MaxiEditor.create('#editor', {
const editor = MaxiEditor.set('#editor', {
toolbar: ['bold', 'italic', 'underline', 'highlight', 'strikethrough'],
plugins: [HighlightPlugin, StrikeThroughPlugin]
});
Expand All @@ -153,7 +153,7 @@ const editor = MaxiEditor.create('#editor', {
### 3.2. Example Configuration

```js
const editor = MaxiEditor.create('#editor', {
const editor = MaxiEditor.set('#editor', {
toolbar: ['bold', 'italic', 'underline', 'highlight', 'strikethrough'],
height: '400px',
width: '600px',
Expand Down Expand Up @@ -443,10 +443,11 @@ editor.element.addEventListener('contentChanged', () => {

### 7.1. Methods

#### **1. `create`**
#### **1. `set`**
```js
MaxiEditor.create(element, config)
MaxiEditor.set(element, config)
```
- Initializes the editor and renders it.
- **element**: The HTML element where the editor is initialized.
- **config**: The configuration object containing the editor options such as `toolbar`, `height`, `width`, and `plugins`.

Expand Down