You are here

README.txt in AutoFloat 8

Same filename and directory in other branches
  1. 6.2 README.txt
  2. 6 README.txt
  3. 7.2 README.txt
  4. 7 README.txt
Name: AutoFloat (autofloat)
Author: Martin Postma ('lolandese', http://drupal.org/user/210402)
Drupal: 8.x


-- SUMMARY --

A text format filter that wraps images in a div or span with odd/even classes
to make them float alternately left and right.

Configurable:
* the starting side
* exclude the module's CSS to use your theme's style.css
* the elements to target, div or span
* add classes to target a 'span', e.g. in case a caption is displayed
* add classes to exclude a 'div', e.g. a set of thumbnails. 


-- EXAMPLE --

The filter turns:
  ‹img src="/path/photo.jpg"›
into:
  ‹span class="autofloat-odd"›‹img src="/path/photo.jpg"›‹/span›

Or:
  <div>‹img src="/path/photo.jpg"›</div>
into:
  ‹div class="autofloat-odd"›‹img src="/path/photo.jpg"›‹/div›


-- FEATURES --

Generates an organized layout of images in a text automatically.

Easy for the less technical users.

Saves time.

Avoids inline styling.

Inserting images later doesn't mess up the alternating floating.


-- INSTALLATION AND CONFIGURATION --

Extract the package in your modules directory, e.g. '/modules'.

On your Drupal site, enable the module under '/admin/modules'.

Add the autofloat filter to one of your text formats under 
'/admin/config/content/formats'. Put it below other image related filters in
the 'filter processing order'.

Configure under '/admin/config/content/autofloat'.

Re-save existing nodes you want to apply AutoFloat to. If you still can't see
any changes, try clearing both your site and browser cache as well.


-- USAGE --

Images will float unless they have the class 'nofloat'.

A 'span' or 'div' with the class 'float' will float the image and other
containing content, e.g. a caption under it.

Images in a 'div' with the class 'nofloat' do NOT float, e.g. a set of 
thumbnails.

Avoid adding classes manually by defining classes added by other 
modules/filters. Use your browser's inspector to find them.

The class 'nofloat' of a nested element has priority over classes set in the 
parent, thus makes that the parent will not float.

Remember an element floats within the block-element containing it. If that 
doesn't cover the full width, the image might not float as expected. 
Check your CSS before submitting an issue.


-- CSS --

The autofloat.css and autofloat-rtl.css files add a right-margin to left
floating images and a left-margin to right floating images. 

If your images won't float your theme might not use the id or class "content"
to target the node body. Adjust the id or class used in the modules' css files
accordingly.

You can exclude the module's CSS on the configuration page to use your
customized theme's style.css.

File

README.txt
View source
  1. Name: AutoFloat (autofloat)
  2. Author: Martin Postma ('lolandese', http://drupal.org/user/210402)
  3. Drupal: 8.x
  4. -- SUMMARY --
  5. A text format filter that wraps images in a div or span with odd/even classes
  6. to make them float alternately left and right.
  7. Configurable:
  8. * the starting side
  9. * exclude the module's CSS to use your theme's style.css
  10. * the elements to target, div or span
  11. * add classes to target a 'span', e.g. in case a caption is displayed
  12. * add classes to exclude a 'div', e.g. a set of thumbnails.
  13. -- EXAMPLE --
  14. The filter turns:
  15. ‹img src="/path/photo.jpg"›
  16. into:
  17. ‹span class="autofloat-odd"›‹img src="/path/photo.jpg"›‹/span›
  18. Or:
  19. ‹img src="/path/photo.jpg"›
  20. into:
  21. ‹div class="autofloat-odd"›‹img src="/path/photo.jpg"›‹/div›
  22. -- FEATURES --
  23. Generates an organized layout of images in a text automatically.
  24. Easy for the less technical users.
  25. Saves time.
  26. Avoids inline styling.
  27. Inserting images later doesn't mess up the alternating floating.
  28. -- INSTALLATION AND CONFIGURATION --
  29. Extract the package in your modules directory, e.g. '/modules'.
  30. On your Drupal site, enable the module under '/admin/modules'.
  31. Add the autofloat filter to one of your text formats under
  32. '/admin/config/content/formats'. Put it below other image related filters in
  33. the 'filter processing order'.
  34. Configure under '/admin/config/content/autofloat'.
  35. Re-save existing nodes you want to apply AutoFloat to. If you still can't see
  36. any changes, try clearing both your site and browser cache as well.
  37. -- USAGE --
  38. Images will float unless they have the class 'nofloat'.
  39. A 'span' or 'div' with the class 'float' will float the image and other
  40. containing content, e.g. a caption under it.
  41. Images in a 'div' with the class 'nofloat' do NOT float, e.g. a set of
  42. thumbnails.
  43. Avoid adding classes manually by defining classes added by other
  44. modules/filters. Use your browser's inspector to find them.
  45. The class 'nofloat' of a nested element has priority over classes set in the
  46. parent, thus makes that the parent will not float.
  47. Remember an element floats within the block-element containing it. If that
  48. doesn't cover the full width, the image might not float as expected.
  49. Check your CSS before submitting an issue.
  50. -- CSS --
  51. The autofloat.css and autofloat-rtl.css files add a right-margin to left
  52. floating images and a left-margin to right floating images.
  53. If your images won't float your theme might not use the id or class "content"
  54. to target the node body. Adjust the id or class used in the modules' css files
  55. accordingly.
  56. You can exclude the module's CSS on the configuration page to use your
  57. customized theme's style.css.