NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

HTML Highlight in text/template script block

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
LukaCoder



Joined: 24 Sep 2013
Posts: 67

PostPosted: Tue Feb 28, 2017 2:51 pm    Post subject: HTML Highlight in text/template script block Reply with quote

Hi guys,

it could be very useful to have HTML syntax within block of scripts with type "text/template"; do you know if there is a way to have this feature enabled?

Example:

<script type="text/template">

//Here it could be useful to have HTML syntax !
<div >
.....

</div>
</script>


Thanks in advance
Back to top
MONIER Vincent
Posted via mailing list.





PostPosted: Tue Feb 28, 2017 6:38 pm    Post subject: HTML Highlight in text/template script block Reply with quote

Hi,

I never heard or such "text/template" (nor WHATWG
https://html.spec.whatwg.org/multipage/scripting.html#scriptingLanguages
?), and since this MIME doesn't refer to HTML, I feel there's no reason
to syntax highlight in such script tag.

Instead, you could/should use the template tag
https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
Syntax highlighting should be correct there.


Le 28/02/2017 à 15:51, LukaCoder a écrit :
Quote:
Hi guys,

it could be very useful to have HTML syntax within block of scripts with type "text/template"; do you know if there is a way to have this feature enabled?

Example:

<script type="text/template">

//Here it could be useful to have HTML syntax !
<div >
.....

</div>
</script>


Thanks in advance





--
Vincent Monier https://reinom.com Ingénieur informatique Davidson pour
General Electric
Back to top
LukaCoder



Joined: 24 Sep 2013
Posts: 67

PostPosted: Wed Mar 01, 2017 9:44 am    Post subject: Reply with quote

Hi Vincent,

thanks for your reply; those script tags are a common way to implement templating functionality on the client side, and are used by many javascript libraries.

Despite this, you are right, we could ( better, we should ) use <template> tags; I didn't know that, but I'll use it in the future.

Thanks
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo