Allow to set canva width and add reset button

Created on 22 August 2024, 4 months ago
Updated 6 September 2024, 3 months ago

Problem/Motivation

It would be nice to have a larger pad/canva.
Also, a reset would be useful to someone who make a mistake.

Proposed resolution

Patch attached

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇹Portugal rfmarcelino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @rfmarcelino
  • Merge request !7Canva size and reset → (Closed) created by rfmarcelino
  • Pipeline finished with Success
    4 months ago
    Total: 147s
    #261750
  • Pipeline finished with Success
    4 months ago
    Total: 135s
    #261823
  • 🇫🇷France lazzyvn paris

    This patch is useless because you can do it in many ways.
    for canvas width you can set width/height by custom theme css. or you can override twig with custom theme sign.html.twig.

    If you want to sign image just upload default image it will have width/height as default image

    For reset button you can enable toolbox option you will have clear button.

    Yes for ckeditor 5, it would be nice to configure width and reset button. In this patch I see you add these options to ckeditor 5 but I don't see any change in ckeditor5 plugin?

  • 🇵🇹Portugal rfmarcelino

    Hi @lazzyvn
    Thank you for your work.

    Yes, you're right. I didn't notice that the toolbox also had it.
    Maybe the help text could be adjusted to make ite clearer:
    "Show toolbox to modify dot size, color pen or clear the canvas."

    I think the reset should be a separate option than the toolbox. The reset/clear should be useful to most users, but not necessarly the line width or color.

    Regarding the CKEditor, to be honest I only tested the field widget.
    Since you consider this useless, go ahead and close as designed. No point of further development.

    BTW, I added a new commit anyway to the MR to revert code added in the last release that caused an error:
    'Drupal\Core\File\Exception\DirectoryNotReadyException'

    It's not related to this issue, but since it's necessary for it to work...

    • lazzyvn committed a0f485c0 on 8.x-1.x
      Issue #3469743: Allow to set canva width and add reset button
      
  • 🇫🇷France lazzyvn paris

    Check dev version if it work for separated option width and clear button

  • 🇵🇹Portugal rfmarcelino

    On the site I was working on, the width is working but I'm not seeing the clear button.
    I tried on a blank install using simpletest.me and when adding the node with that field, I get a WSOD:

    • eb2f5b80 committed on 8.x-1.x
      Issue #3469743: Allow to set canva width and add reset button
      
  • Status changed to Fixed 4 months ago
  • 🇫🇷France lazzyvn paris

    widget and ckeditor

    and formatter

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024