Skip to content
This repository was 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
yoshi-1 wants to merge 1 commit intostwe:masterfrom
yoshi-1:html-text-buttons
Open

Use js escaping for buttons 'text' property, so it can contain html tags#696
yoshi-1 wants to merge 1 commit intostwe:masterfrom
yoshi-1:html-text-buttons

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.

2 participants