PHP CODE Highlighting and the LESS...

User 2724517 Photo


Guest
4 posts

Hi Everyone;
(First time poster here. It seems I am only allowed to post in this forum, otherwise I would post this in HTML editor.)

I am using the HTML Editor, the free one for now version - version 10.1 build 738, until I purchase.
PHP page code highlighting works perfectly.
BUT, if I introduce a break tag or even simply a less than sign < , all of the rest of the PHP code highlighting just turns dark grey. No more code highlighting, although php code/functionality itself still works when loaded by the server.

Example # 1 : echo 'some content here < BR > ' ; or
Example #2 : if ( 1 < 3 )

I discovered a work around to keep the remaining PHP code highlighting working, which is to escape the less than sign with a backslash like this \< However, all of my outputted text will print the break and the backslash.
And for the second example obviously I can't do that so I have been kinda doing things like if (! ( 3 > 1) )
The greater than sign is not the problem just the less than sign.

Question:
Is this a known problem ?
Is there a way to fix it --- and allow the less than sign to stop breaking the PHP code highlighting?

Thanks
Stephen

User 10077 Photo


Senior Advisor
1,096 posts

I'm pretty sure it's a known issue. I usually have more than one page open. I do my set of PHP coding, click on the tab for the other page, then click back and the coloring is restored until I start putting in the next set of PHP code.

Right now, CC is working toward their release of Responsive Site Designer so that has their attention. (It will be an awesome program.) Be patient, and I imagine they will fix the coloring issue.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 2724517 Photo


Guest
4 posts

Thank you very much. Greatly appreciated.
Stephen
User 2724517 Photo


Guest
4 posts

Well here is a work around so you won't have to switch back and forth between tabs

Put this in your include

<?php
function insertBR(){
return "<BR />\n";
}
function insert_open_bold_tag(){
return "<b>";
}
function insert_close_bold_tag(){
return "</b>";
}
?>


Then call it from your script and voila no more broken code highlighting.
User 2724517 Photo


Guest
4 posts

Or you can use this in your include to save space

<?php
//html tag insertions

function insertBR(){
return "<BR />\n";
}


function insert_open_bold_tag(){
return "<b>";
}

function insert_close_bold_tag(){
return "</b>";
}

function iBR(){
return insertBR();
}


function ioBTag(){
return insert_open_bold_tag();
}

function icBTag(){
return insert_close_bold_tag();
}

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.