Atto ::: atto_sketch
Maintained by Matthew Davidson
Simple image "paint like" editor for atto.
Latest release:
1007 sites
28 fans
Current versions available: 2


Adds a simple "Paint" like program to the atto editor. Features include simple shape tools, drawing, typing, colors, undo/redo. Utilizes the open source "Literally Canvas" image editor.


Create the lib/editor/atto/plugins/sketch folder and place all files there. Run through standard Moodle update/install process.



Set cursor in the editor and click the sketch icon. The editor will open full screen. Use a stylus, finger or mouse to create/edit image. Click "Insert Sketch" to add to editor.

* When used with the Quiz essay question type, please be advised that the essay response format must be set to "HTML-Editor with filepicker" for full functionality.


Screenshot #0
Screenshot #1


Matthew Davidson (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS


  • Thu, Jun 29, 2017, 2:20 AM
    Approval issue created: CONTRIB-6956
  • Mon, Jul 31, 2017, 2:29 PM
    HI Matthew, I was testing the sketch plugin on my local Moodle setup. I really liked the functionality it provides but unfortunately for me the canvas area is not expanding to full screen. It is limited to 900 px by 369 px only with a vertical scroll bar in sidebar.
    I had checked in Moodle 3.2 on Firefox and Chrome browsers. Can you please help in resolving the issue?
  • Wed, Aug 2, 2017, 7:42 PM
    I downloaded this and I am getting the error that sketch.html is not found. When I looked at the code it was calling for /lib/editor/atto/etc. I believe you want to put a ".." in front of the first '/' so its ../lib/editor/atto/ etc That fixed it for my dev site. I am using the 2017080100 version of the plugin.
  • Wed, Aug 2, 2017, 8:07 PM
    Thank you for your comment. I made the change that removes the .. because I found in my testing that it didn't work in some places of Moodle. I'll look into it today and see what I can do about the path.
  • Wed, Aug 2, 2017, 8:56 PM
    Chris, I've just released a hotfix release 2017080200 that should solve this issue.
  • Wed, Aug 9, 2017, 1:27 AM
    I also see the canvas area not expanding to full screen in the Adaptable theme (ver 1.5 and Moodle 3.2). If I switch to the More theme, it expands as expected.
  • Wed, Aug 9, 2017, 1:47 AM
    Rob, Are you making any kind of alterations to the setup. I've installed Moodle 3.2 and Adaptable theme 1.5 and haven't been able to recreate this issue.
  • Fri, Aug 11, 2017, 2:15 AM
    Hi Matthew. I have just installed Sketch in our system at ULPGC (moodle 3.1 with theme adaptable 1.3.3 buy customized). Sketch is working properly usually. We are interested on Sketch as an image annotator. Most of the time if you have an image selected and launch Sketch you can edit on it without trouble.
    a) But sometimes, mostly when de image is large, only a portion in shown, the rest of the canvas is blank /(white). it seems like a curtain NOT descending.
    b) When the image is small and NOT fills the canvas, the generated image is not cropped, there is a lot of bank space

    Where can I change the dimensions of the javascript dialogue and canvas in code?? I've tried the css included but without success.
  • Fri, Aug 11, 2017, 2:22 AM
    Enrique, yes, I've encountered these problems before. I believe they are issues with the drawing software that is used. See It is possible that these bugs could be known issues there or my need to be posted with them. Some of the sizes are overwritten via javascript in line 215 range of (has to be rebuilt from the src directory and compiled)
  • Mon, Aug 21, 2017, 12:01 AM
    Is there a way to support moodle mobile app so that the images are also displayed in the app?
  • Fri, Aug 25, 2017, 4:25 AM
    Hi Matthew, thanks for your tip. I've been changing some sizes, and looks better (in my opinion) .
    But I have realized a problem that's a showstopper for us.

    Sketch works well on pages managed by teachers. It works also on forum posts, and the raw data is saved to database. BUT on display the content is filtered out by format_text() function in forum_print_post(). The only way to show it in the discussion page is to use "noclean". That's not acceptable for a production site.

    As I commented, we are interested on Sketch as an image annotator. Te purpose is to allow students (or teachers) to add marks and signs to an existing image. I'lve lived a s a teacher many moments of "ahh, I'd it in front of my eyes without knowing where to look at" by students. So, having Sketch working in forum pages is a must.

    In addition. Currently Sketch return a base64 encoded text embedded, That may scare most users, in my opinion. Both problems would be solved if the return from Sketch would be a file in the editor area, and a link to that in the editor text ¿Is that possible, feasible?
  • Fri, Aug 25, 2017, 8:12 PM
    @Enrique I will look into this today. If true, that is very strange because the content it returns is an tag.
  • Fri, Sep 1, 2017, 5:55 PM
    Hello Matthew,
    I would like to use Sketch for a maths test. Nevertheless, the image created with sktech in a "comment question" (Test Plugin") appears in the preview BUT NOT in the final answer that has to be noted by the teacher.
    Do you have a solution? Is it an editor problem?
  • Fri, Sep 1, 2017, 8:11 PM
    @Thomas Le MONS @Enrique Castro Ok, so I now understand what is going on. Moodle uses a code cleaner called HTMLPurify in places where students can also enter data. (glossary, forums, quiz questions, etc). Part of the code cleanup is removing the data:image/png:base64 string that this plugin uses. The fix is very easy, but requires a core change. See In the workaround section it will have 2 ways around this issue. Hint, don't use the first workaround. smile I am working on getting this fixed in Moodle as soon as possible.
Please login to post comments