Author Topic: How can I add {{ }}as embedded PHP section in HTML ?  (Read 486 times)

jcelle

  • Senior Community Member
  • Posts: 186
  • Hero Points: 5
How can I add {{ }}as embedded PHP section in HTML ?
« on: July 26, 2020, 08:21:24 am »
Hello,
I would like to add the {{ }} sequence as a PHP section identifier in HTML files (equivalent to <? ?> or <?php ?>).
(Idea is to start supporting Blade syntax used in Laravel).
I could not find how to do it.
Maybe someone of you did that already ?
Thanks for any advice.
Jerome

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6210
  • Hero Points: 482
Re: How can I add {{ }}as embedded PHP section in HTML ?
« Reply #1 on: July 26, 2020, 11:29:03 pm »
Unfortunately, HTML/XML still has a fair amount of hardwired color coding. In a different language type, this would be easy to add.

I'll see if we can add support for this to v25.

jcelle

  • Senior Community Member
  • Posts: 186
  • Hero Points: 5
Re: How can I add {{ }}as embedded PHP section in HTML ?
« Reply #2 on: July 27, 2020, 08:32:02 pm »
I see...
Is there any way I could configure tokens starting with @ (like @if/@endif) to be colored differently.
I don't really understand the HTML/ColorCoding dialog box: I wish I could enter tokens using regular expression @.+ for instance rather than enumerating all @xxx directives.
Right now I used the empty General/identifiers settings using "ID start character" = @ but that eats the slot !
« Last Edit: July 27, 2020, 08:35:07 pm by jcelle »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6210
  • Hero Points: 482
Re: How can I add {{ }}as embedded PHP section in HTML ?
« Reply #3 on: July 27, 2020, 09:02:43 pm »
On the tokens tab, click the Add Words... button. See attached picture.

You could use a regex but I think the Add Words... button is easy enough since it supports multiple space delimited words.