Browse Source

initial commit

master
scossar 9 years ago
commit
352277bb55
2 changed files with 14 additions and 0 deletions
  1. +8
    -0
      assets/javascripts/image-tag-whitelist.js
  2. +6
    -0
      plugin.rb

+ 8
- 0
assets/javascripts/image-tag-whitelist.js

@ -0,0 +1,8 @@
(function () {
Discourse.Markdown.whiteListTag('img', 'class', 'img-left');
Discourse.Markdown.whiteListTag('img', 'class', 'img-right');
Discourse.Markdown.whiteListTag('img', 'class', 'img-center');
Discourse.Markdown.whiteListTag('img', 'class', 'img-custom');
Discourse.Markdown.whiteListTag('img', 'data-max-height', /\d+\%?$/ );
Discourse.Markdown.whiteListTag('img', 'data-max-width', /\d+\%?$/ );
})();

+ 6
- 0
plugin.rb

@ -0,0 +1,6 @@
# name: image-classes
# about: Whitelist a few image tag classes to allow for styling with css
# version: 0.1
# authors: scossar
register_asset 'javascripts/image-tag-whitelist.js', :server_side

Loading…
Cancel
Save