README.txt 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. Insert is a utility that makes inserting images and links to files into text
  2. areas or WYSIWYGs much easier. It adds a simple JavaScript-based button to
  3. File and Image fields. Images may be inserted into text areas with a specific
  4. Image style.
  5. Insert was written by Nate Haug.
  6. This Module Made by Robots: http://www.lullabot.com
  7. Dependencies
  8. ------------
  9. Insert module does not have any dependencies, but it won't do anything unless
  10. you have at least one File or Image field configured on your site. Both of
  11. these fields are provided by Drupal core.
  12. Recommended
  13. -----------
  14. * WYSIWYG module
  15. Install
  16. -------
  17. 1) Copy the insert folder to the modules folder in your installation. Usually
  18. this is sites/all/modules.
  19. 2) In your Drupal site, enable the module under Administer -> Modules
  20. (/admin/modules).
  21. 3) Add or configure a File or Image field under Administer -> Structure ->
  22. Content types -> [type] -> Manage Fields
  23. (admin/structure/types/manage/[type]/fields). Once configuring a field,
  24. there is a new section in the Field options for "Insert". You can then
  25. configure the field to include an Insert button and what templates you would
  26. like to have.
  27. 4) Create a piece of content with the configured field. After uploading a file,
  28. an "Insert" button will appear. Click this button to send the file or image
  29. into the Body field.
  30. Insert should work on multiple fields (the last field that was active will
  31. receive the file), and with most popular WYSIWYG editors.
  32. Theming
  33. -------
  34. Insert can be configured to work with non-HTML filters like BBCode or Markdown.
  35. To do this, copy the template file you would like to change from the "templates"
  36. directory to your active theme's directory. Then empty your Drupal caches at
  37. admin/config/development/performance.
  38. The Image templates may also be used per Image style. You can copy the
  39. image-insert-image.tpl.php file to your theme directory and then rename it to
  40. image-insert-image--[style-name].tpl.php, where [style-name] is the name of the
  41. Image style. Change underscores to hyphens in the style name.