Atto: Paste special

atto_pastespecial
Maintained by Picture of Joseph Inhofer Joseph Inhofer
PasteSpecial button for Atto reduces clutter when pasting from non-Atto text editors.
657 sites
95 downloads
27 fans

This is a plugin for Atto editor in Moodle that allows the user to paste content from several different rich formatting areas and either import the styling or import as unformatted text. To install, unpack to lib/editor/atto/plugins/pastespecial and visit the admin notifications page to install. Then add the button on that Atto toolbar settings page. The pastespecial settings page can be used to configure the allowed styles when importing formatting.

Pastespecial now "allows" tables (as of version 2016021100). It gets pasted in as normal without any handling. I STRONGLY encourage you to create your tables within Atto, but apparently not enough to artificially prohibit this. 


Screenshots

Screenshot #0

Contributors

Picture of Joseph Inhofer
Joseph Inhofer (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Joseph Inhofer
    Fri, Sep 18, 2015, 5:05 AM
    David,

    I have updated the code as per the prechecker suggestions. Is there a way to run it again and see if all of the issues have been corrected and if any new ones arise?
  • Picture of Bernhard Weichel
    Mon, Dec 14, 2015, 5:52 PM
    This is one of the most urgently required plugins. In particular while working with Chrome, cut&paste in the editor adds a lot of style garbage. So I highly appreciate this plugin (even if I think that ATTO should cleanup the pasted HTML by itself wink

    So I installed it on my test drive. It seems to pass some styles per default:

    I made an experiment in Chrome:

    1. create a simple paragraph
    2. do cut & paste
    3. paste from word
    4. paste from other.

    The raw HTML looks like this. You can see that direct paste adds a lot of styles. Add "from word" and "add from other" yields the same result. I added a style named "foo" to the configuration of "paste from other", just to ensure that no hidden default (e.g. the one from word) is applied. But color and font size are always pasted.

    Simple paragraph with bold .


    -------------------- direct paste

    Simple paragraph with bold .


    -------------------- paste from other

    Simple paragraph with bold .

    --------------------- paste from word

    Simple paragraph with bold .



    -----------------------------------------------------------------

    I still find ATTO being indeed simpler to use than TinyMce but, the generated HTML is still not optimal (not to say a nightmare). You can see that the paste
  • Picture of Bernhard Weichel
    Mon, Dec 14, 2015, 5:57 PM
    I see that the comment function interprets the HTML: so I try again (sorry for polluting this here).

    <p>paragraph="" with=""
    <b="">bold .</b=""> </p> <p></p> <p> <br> </p> <p>-------------------- direct paste</p> <p> </p> <p style="margin: 0px 0px 10px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">Simple paragraph with <b>bold</b> .</p> <br>-------------------- paste from other
    <p></p> <p> </p> <p style="color: rgb(51, 51, 51);font-size: 14px;">Simple paragraph with <b>bold</b> .</p>
    <p>--------------------- paste from word</p> <p></p> <p style="color: rgb(51, 51, 51);font-size: 14px;">Simple paragraph with <b>bold</b> .</p> <p style="color: rgb(51, 51, 51);font-size: 14px;"> <br> </p> <p></p> <p></p> <p></p>

  • Picture of Iñigo Zendegi Urzelai
    Thu, Mar 3, 2016, 9:06 PM
    Hi Joseph,

    We've been using this plugin and it's great!

    We've tried the 'Set as default' option and realized it is quite aggressive (many people are used to paste with 'Ctrl+V' and complained because they want it to do just that), but a user came with another option that I'd like to see in this plugin: the option to trigger Paste Special when the user types 'Ctrl+Shift+V', as this is the special paste command used in other software. This could added as another option to the actual 'Set as default' setting: Disabled, Set as default Ctrl+V, Set as default Ctrl+Shift+V (new).
  • Picture of Joseph Inhofer
    Wed, Mar 16, 2016, 4:02 AM
    Iñigo,

    Thank you for your suggestion! The latest version, 2016031100, does have the "set as default" setting changed to a single select that has the options of "none", "ctrl+v", and "ctrl+shift+v". Let me know if this is different from what you'd like, or if you'd be interested in having any more improvements to this plugin.
  • Picture of Iñigo Zendegi Urzelai
    Wed, Mar 16, 2016, 3:48 PM
    Hi Joseph,

    It does just what I expected. I think the most reasonable default value is "Ctrl+Shift+V" as you decided so it couldn't be better smile

    Great work Joseph!
  • Ricardo Caiado
    Wed, Dec 7, 2016, 8:43 PM
    Any upgrade to Moodle 3.2?
  • Picture of Michael Milette
    Tue, Feb 6, 2018, 11:47 PM
    Hi Joseph,

    Any chance that we might be seeing a version of Paste Special that is compatible with newer releases of Moodle (3.1 to 3.4) in the near future or have you abandoned the project? I could really use this functionality in Moodle 3.4.

    Best regards,

    Michael
  • Picture of Alexandre Bento Martins
    Thu, Feb 8, 2018, 2:23 AM
    Any upgrade to MOODLE 3.4 ?
  • Ricardo Caiado
    Sun, Apr 15, 2018, 9:10 AM
    Is this plugin discontinued?
  • Picture of Michael Milette
    Tue, Jul 10, 2018, 2:47 PM
    Hi Joseph,

    Hope to see a version of Paste Special for Moodle 3.5 in the near future.

    Best regards,

    Michael
  • Picture of Bert van der Hooft
    Wed, Aug 22, 2018, 1:51 PM
    Hi Joseph,

    Your plugin is highly appreciated. Any chance for a newer version

    Bert
  • Al
    Sun, Nov 25, 2018, 11:15 PM
    Please, can you add moodle auto-updater to this plugin? We update moodle every week and have to find the plugin when the others all do it automatically. It would save so much time, thank you.
  • Picture of Andrea Rosito
    Thu, Feb 7, 2019, 11:58 PM
    This is a great Moodle plugin, that I use on my site on Venice.
  • Picture of Eric Breton
    Fri, Apr 12, 2019, 10:33 PM
    Hello, can you tell us if the plugin will support version 3.6 of Moodle in a near future ?
1 2
Please login to post comments