NodeBB / NodeBB/nodebb-plugin-composer-quill

Deleting the entire content of the editor switches Direction

Open
#76 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
19
Forks
14
Avg merge
1m
Merged PRs (30d)
8

Description

Solution that works (for now):

quill.on('text-change', function () {
			if (isEmpty(quill)) {
				console.log('empty!!');
				//quill.deleteText(0, quill.getLength());
				//quill.setText('​');
				textareaEl.val('');
				return;
			}
			textareaEl.val(JSON.stringify(quill.getContents()));
			textareaEl.trigger('change');
		});

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 from the Quill text-change handler shown in the issue and reproduce deleting all editor content. Determine why the editor direction switches, then verify that deleting everything leaves the direction unchanged and preserves the expected empty textarea value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.