Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP highlighting without the opening PHP tag #2542

Closed
corradomatt opened this issue Jun 11, 2015 · 2 comments
Closed

PHP highlighting without the opening PHP tag #2542

corradomatt opened this issue Jun 11, 2015 · 2 comments

Comments

@corradomatt
Copy link

I know that this is now how PHP files actual work in the wild, but would it be possible to allow for the ace editor to provide syntax highlighting when in PHP mode even if I don't physically write <?php at the start of the editor? I looked through the documentation briefly but didn't find anything in reference to this as a feature. I'd like to give my users the ability to just start writing PHP without requiring them to include the opening tag so maybe adding an option on the PHP editor that will allow for this?

@baconbrad
Copy link

Yes you can. You need to set inline to true.
session.setMode({path:"ace/mode/php", inline:true})

@corradomatt
Copy link
Author

Awesome! Thanks @baconface - works great!

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

No branches or pull requests

2 participants