HTML triggers within PHP

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Kasper
Avatar
Hi,

I use the TagListTrigger from the example to show Intellisense for HTML tags. However, once the user is inside a block of PHP code (<? ?>), it's no longer triggered. Normally, I can certainly see why, however, I've noticed that it says "DefaultState", just like if you were standing in a normal HTML document. Is it possible to make the TagListTrigger occur even though you are within a PHP block?

Comments (5)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
When the languages get loaded, the triggers get referenced to specific state objects. So while there may be two lexical states with a key of DefaultState (one for HTML, one for PHP), they are different instances. Therefore you'd need to also define the trigger in your PHP def for its DefaultState.


Actipro Software Support

Posted 13 years ago by Kasper
Avatar
Okay, so making the TagListTrigger work would probably be some what easy, but making it work with attributes and values as well would be a bit more complicated, I guess?
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Not too bad, you just need to determine what tag you are in and display the appropriate attributes, then the same sort of thing for values.


Actipro Software Support

Posted 13 years ago by Kasper
Avatar
Yeah, but I guess I won't be able to use the normal triggers for attributes and values, since PHP won't have the same states defined. What do you propose to do here? :)
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Yes you'd have to determine in what PHP lexical states the various triggers would be valid and set up your language appropriately.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.