How to force PhpStorm to highlight HTML code in *.php files - phpstorm

I encountered an issue in PhpStorm IDE. I have some HTML Code in *.php file that doesn't format properly.
How can I force HTML syntax highlighting in particular *.php files?

Related

How can I format HTML code in tpl files in Vscode

how can I turn on snippets and html code formater in .tpl files? I will using Vscode to edit PrestaShop files where is a lot of html code inside .tpl files.
Format html code inside .tpl file
You can try these steps:-
First check for any extension available in vscode market place. If it is available then you can proceed with it.
The second option, which is manually configuring Visual Studio Code to handle ".tpl" files, can be done by following these steps:
Go to Settings editor, search for "files.associations" and click on the Edit in settings.json link.
In the settings.json file, add the following line of code: "* .tpl": "html"
This tells Visual Studio Code to associate the ".tpl" file type with the "html" language mode.
You can edit the file extension to .html to work with the html code formatter.

IntelliJ change language mode same as VS Code

I'm working on a project(IntelliJ + Grav) which all base files are *.md, I have the need to just write HTML code in one of this MD files but I can find an option to change the syntax highlight or intellisense to trigger(emmet, tags, ...).
In VS Code you can change the language mode no matter which file extension you have open.
Q: Is there a way to make IntelliJ highlight HTML code in a MD file.
PS: Don't tell me to change the file extension or open the file in VS Code, as I'm currently doing it.
You can add the file name to the HTML file type list of files/extensions and IntelliJ IDEA will treat it as HTML file instead of Markdown file.

How to make atom detect .jade correctly?

I want to see jade highlighting when I open .jade file on mac.
Currently I have https://atom.io/packages/language-jade installed, but when I open .jade file atom detect it as html.
I install https://atom.io/packages/file-types and add to config file (atom->open your config):
"file-types":
jade: «source.jade»
It don't change anything at all.
I think default atom language-html plugin override my settings.
If I disable language-html, then atom detect .jade correctly and highlight it properly.
But without language-html plugin atom detect html as plain text and don't highlight it at all.
What I should to to get both html and jade proper highlighting?
With all best regards. Anton.

Does Doxygen support Background Images?

I'm currently setting up doxygen to use for generating my project's documentation. I've included a few custom pages which include html code.
These html files use custom .css stylesheets for their backgrounds - which work fine in web browsers. In the doxygen output .chm file, all the text and images appear in their correct places (and use the correct font and sizes) - however the background image does not display.
Does Doxygen support background images - and if so do I have to change any settings to display the images?
Thank you.
I solved my issue, here's how I did it:
The reason for doing all of these steps is because doxygen doesn't have a very obvious way of including images from .css files.
To compile the extra pages in .chm format:
Use doxygen to update the code changes to .chm format as normal.
Run a tool called "Keytools" (It's freeware: http://www.grainge.org/pages/authoring/reverse_engineering/KeyToolsSetup.zip )
Decompile the .chm to give a .hhp format.
Open the .hhp file in Microsoft's HTML Help program.
Import the contents folder in the Contents section.
Add all of the images used in the documentation .css file to the Project as Topic Files.
Add the html pages to the contents page.
Compile the .chm file.

Strange problem while compiling CHM file

I had to write some documentation. I wrote each page in MS Word and then save each *.docx as htm file. I'm using "HTML Help Workshop" (from microsoft) to compile a chm file.
I was able to sucessfully create a chm file but the problem is that not all images in chm file are displayed. I tried decompiling the *.chm file into another folder and opened each .htm file in web browser. All images are correctly displayed.
Then why aren't they displayed in chm file. Strangely, only some of them aren't displayed. I checked if image format is causing problem, but all images are of same format. I checked if file naming is a problem, but all images are named like image[001-100].jpg in their corresponding folders.
Any idea about whats going wrong?
HTML Help Workshop (HHW) is known to have problems with the HTML generated by Word (or better put: Word generates terrible HTML). Some versions put VML coding around the IMG tags that HHW cannot handle.
Possible solutions:
In Word: Deselect the option 'Rely on VML for displaying graphics in browsers' (Tools > Options > General > Web Options)
In Word: Save as 'filtered HTML'.
In HHW: Manually add the images to the project's [FILES] section.
Let me know if any of this helps.
More information can be found in the HTML Help 1.X FAQ