HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

To add this to you buttonbar.

peregrineperegrine MVP
edited December 2013 in Tutorials

To add the pullquote insert to your buttonbar.

1 Add the icon below to your plugins/ButtonBar/design/images

and call it pullquote.png

2 Add this to your plugins/ButtonBar/design/buttonbar.css

.ButtonBar .ButtonBarPullquote { background-image: url('images/pullquote.png'); }

3 Add this to ButtonBar/views/buttonbar.php

echo '<span class="ButtonWrap"><span>pullquote </span></span>';

4 Add among this other case statement ButtonBar/js/buttonbar.js

   case 'pullquote':
           $(TextArea).insertRoundTag('pullquote',bbcodeOpts);
              break;  

I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Comments

  • peregrineperegrine MVP
    edited April 2014

    you may need to change this as well in buttonbar.js to use a bbcode for the pullquote when your main formatting is set to Html.

    kluge...

    change in buttonbar.js

        PerformHtml: function(TextArea, Operation) {
        var htmlOpts = {
        opener: '<',
        closer: '>'
        }
    
    to
    
        PerformHtml: function(TextArea, Operation) {
        var htmlOpts = {
        opener: '<',
        closer: '>'
        }
        bbcodeOpts = {
        opener: '[',
        closer: ']'
        }
    

    if you use markdown as your main formatter.
    the same may be the case I haven't tested for markdown (to use the bbcode instead of markdown option for pullquote.

    PerformMarkdown: function(TextArea, Operation) {
             var markdownOpts = {
                opener: '',
                closer: '',
                closeslice: ''
             }
    
               bbcodeOpts = {
                opener: '[',
                closer: ']'
             }
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.