philippfrenzel / yii2pinit
Yii2 pinit Integration
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-11-23 16:21:22 UTC
README
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;