jodit / jodit/jodit-angular

Cannot disable after initialization

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
48
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Issue:
After initialization, updating the config object's disabled property does not disable the editor.

Expectation:

<jodit-editor [config]="config"></jodit-editor>

ngOnInit() {
        this.config = {
            enter: "DIV",
            toolbarAdaptive: false,
            disabled: false
        };
}

disableEditor() {
        this.config.disabled = true;
}

When called, "disableEditor()" should disable the wysiwyg. It currently does not.

My current work-around is to have two editors. One initialized with disabled = false, and one with disabled = true and use [hidden] to switch between the two as needed. Obviously not ideal.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the <jodit-editor [config]="config"> integration and trace how changes to config.disabled are handled after initialization. Verify the behavior with the shown disableEditor() sequence; done means updating config.disabled to true disables the existing editor without requiring a second editor instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.