- First commit to issue fork.
- First commit to issue fork.
- First commit to issue fork.
- @fisherman90 opened merge request.
- 🇩🇪Germany fisherman90 Dortmund
If you want, please have a look at my approach in https://git.drupalcode.org/project/maxlength/-/merge_requests/25 .
I'm repsecting the "Hard limit" option as well as syncing the textfield with the contents of the editor.
This way, maxlength counting works again.I'm sure there's better approaches to solving this, but I didn't find any better.
- 🇷🇴Romania bogdanstamate06
Hi @fisherman90,
I tested out your commit, and it works fine.
I have a question though. I am trying to remove from the total count number, the spaces and the line breaks.
Do you have any idea how to achieve this?Thanks!
- 🇩🇪Germany fisherman90 Dortmund
@bogdanstamate06 I've tried removing the total count number from the "Count down message" (is that what you meant?).
Also in case I understood it differently, I reduced the "Max length" Number for an already existing field, which also seems to work with spaces / lines.Are you sure this has something to do with this issue? Or is it maybe another Problem you are running into?
Sounds like maybe your text formats need to have a look at.At least for now I cannot reproduce that the spaces / line breaks get broken by the change.
If this is still an issue for you and does not come from text formats or so: Can you post a reproductible scenario for me, so I can try to get the error on my setup, too? - Status changed to Needs review
almost 2 years ago 12:12pm 13 February 2023 - Status changed to RTBC
almost 2 years ago 4:18pm 13 February 2023 - 🇺🇸United States hipp2bsquare Temple, New Hampshire
Excellent! I've tested fisherman90's merge request and it's working great on both CKE5 and 4. I believe all our test coverage is CKE-version agnostic, but I will confirm with the other maintainers.
- 🇺🇸United States hbrokmeier Wisconsin
I also tested fisherman90's merge request with CKE5, and it looks good, the countdown is working as expected.
- Assigned to joevagyok
- Status changed to Needs work
almost 2 years ago 12:46pm 14 February 2023 - 🇧🇪Belgium joevagyok
All works fine for me as well however, I'm working on implementing test coverage for both CKE versions.
- Status changed to Needs review
almost 2 years ago 4:07pm 14 February 2023 - Status changed to Needs work
almost 2 years ago 4:25pm 14 February 2023 - 🇧🇪Belgium joevagyok
Seems there is a problem over D10. As the tests are failing and I confirm after manual testing too that the character count doesn't work over D10. On D9 it works fine with CKEditor5, as you can see on the tests as well.
- Status changed to Needs review
almost 2 years ago 4:42pm 14 February 2023 - Status changed to Needs work
almost 2 years ago 11:31pm 14 February 2023 - 🇺🇸United States cedewey Denver, CO
Thanks for updating the merge request Joe.
This fix needs a bit more work. If I set this to be a Hard Limit, when I reach the end of the limit and I keep typing, the text I type ends up being added to the beginning of the body field.
- 🇧🇪Belgium joevagyok
I see, I tried this on 9.5.2 with CKEditor4 and I could reproduce it, so we have this bug from before, not related to the CKEditor5 implementation. I will try to see what's the problem but we might need a separate issue for it.
- 🇧🇪Belgium joevagyok
I pushed a potential fix for the problem described in #25.
However, I found a problem when typing and pressing SHIFT+ENTER for new line I get the
alert('Expected end tag: ' + expected_tag_name + '; Found end tag: '+tag_name);
kick in making the browser tab unusable, need to close and reopen the page. Not sure if it is due to my text filter + editor configuration or it is an actual issue. Need to look into it. - 🇧🇪Belgium joevagyok
I made a commit that adds annotations to the functions we have in the JS. Sorry for the noise, but I really needed to document the code properly because it is very difficult to get around the legacy code without proper documentation.
- 🇺🇸United States cedewey Denver, CO
Unfortunately with the latest version of the merge request the counter is not updating at all. I've tested this with Drupal 9.5.3 and Drupal 9.5.4. I also tried flushing all caches and testing again.
- 🇧🇪Belgium joevagyok
For me it works fine, I reinstalled the whole thing and can't reproduce the problem.
- First commit to issue fork.
- Status changed to Needs review
almost 2 years ago 6:03pm 3 March 2023 - 🇺🇸United States cedewey Denver, CO
Confirmed that the page breaks and other singleton HTML tags now work as expected.
I was able to figure out why the counter was not working in some cases.
If my text format starts in CKEditor 4 and I switch to CKEditor 5, then the counter no longer updates. If I save the node and then return to the edit form then the counter and limit method works as expected.
I think we can open a separate issue for that and proceed with this fix, but curious what other maintainers thinks. This also needs a code review from one other maintainer.
- Status changed to Needs work
almost 2 years ago 10:32pm 3 March 2023 - 🇺🇸United States cedewey Denver, CO
Upon further testing if you include an image or video within a text field with MaxLength is triggers an infinite loop. The single closing element issue still needs some more work.
- Status changed to Needs review
almost 2 years ago 1:15pm 7 March 2023 - Assigned to hipp2bsquare
- 🇺🇸United States cedewey Denver, CO
I just tested this with an image in the text field and it's now working as expected. I also tested with
and tags. Those too are working as expected.Once this receives a code review from a maintainer this will be ready to merge into 2.1.x and we can issue a new release. Exciting!
- Assigned to hbrokmeier
- Assigned to cedewey
- 🇺🇸United States hbrokmeier Wisconsin
Looks good to me! Elements with attributes are working and nothing stood out to me in the code review.
- Status changed to RTBC
almost 2 years ago 8:42am 8 March 2023 -
joevagyok →
committed 7decd474 on 2.1.x authored by
fisherman90 →
Issue #3267413 by joevagyok, Chewie, fisherman90, hipp2bsquare,...
-
joevagyok →
committed 7decd474 on 2.1.x authored by
fisherman90 →
- Status changed to Fixed
almost 2 years ago 5:39pm 8 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 3:39pm 5 April 2023 - 🇺🇸United States kevinquillen
FYI I have opened this back up. 🌱 [Meta] Create new major branch and add support for CKEditor 5 Active