Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Use js escaping for buttons 'text' property, so it can contain html tags #696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoshi-1
Copy link

@yoshi-1 yoshi-1 commented Oct 12, 2017

-- corrected branch original PR #629 ---

Hi,
i suggest to change the default html escaping of the buttons text in the twig template, so that it's possible to use html tags for styling the text eg. with an icon like this:

$this->extensions->set(array(

       		'buttons' => array(
            	'create_buttons' => array(
                	array(
                    	'action' => array(
                        	'template' => ':post:action.js.twig',
                        	//'vars' => array('id' => '2', 'test' => 'new value'),
                    	),
                    	'text' => '<i class="fa fa-plus"></i> New',
                	),
            	),
       		),
        ));

@mshd
Copy link

mshd commented Feb 27, 2020

This is useful, I found a workaround if somebody needs it urgently

"button_options" => [
                      "text" => "<span class='glyphicon glyphicon-wrench'></span>"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants