philippfrenzel/yii2pinit Yii2 pinit Integration

yii2pinit.js

yii2pinit

Pin It Button for Yii2

Setup

Pls add the image you want to show as overlay to your pictures within the folder

web/img/pinterest.png

Should be interlaced and not to big;)

Sample CKEDITOR

$pinterest = <<< SCRIPT
{instanceReady: function() {
  this.dataProcessor.htmlFilter.addRules({
      elements: {
          img: function( el ) {
              if ( !el.attributes.alt )
                  el.attributes.alt = 'pinterest-image';
              var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<div class="pinterest-image">'+el.getOuterHtml()+'</div>' );
              el.replaceWith(fragment);
          }
      }
  });          
}}
SCRIPT;

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

No stable releases.

Comments



No stable releases.



MIT license
Stats
0 github stars & 0 github forks
0 downloads in the last day
0 downloads in the last 30 days
26 total downloads