Streaming live at 10am (PST)

Artifical / Fake Elements


#1

I would like the ability to create in a "fake element"... technically a "comment"...

I'm quite certain... you understand what I need.

Currently... I use a DIV with height set to 0 zero.

That way... "it - the div - never really appears".

And it doesn't anyways - because when I export the code... I immediately strip it out and replace it with code I've already created.

I need... the creation of a comment ie: <!--- --->

My code can then search for a specific string - and replace certain aspects of the generated code.

For example.... I could put "<?php echo $EmployeeName;?>"
into the comment... and my "stripper application" would simply replace the comment brackets.... the <!--- and --->. And voila... my code would perfect in php - once I change the file extension to... dot php... .php.

This would also help the web designer by commenting their code.

I could embed "foreign code" that would not run on Webflow.io.

I know this go counter-intuitive to hosting on webflow... but

This would allow me to decrease a great of development time... and increase quality of product... to my customers.

as it would help decrease typing errors - and time.

Please create a Comment element... that is never seen visually - except in source code.

With appreciation.

Pierre


#2

You can use the HTML widget to add any dummy element you need.

You don't need to add any property to it, it won't show up in preview or when published...


#3

Unless we are talking about different things...

Webflow adds an div with the w_embed class.

I just need a comment. I don't want the div.


#4

Agree 100% with this.

By allowing raw comments (not wrapped with a div), we can use gulp or grunt tasks to inject HTML during build processes.

It would definitely streamline my workflow, at least.

Thoughts @webflow?


#5

If your purpose it to search and replace, how is looking for:
<div><!-- * --><div>
different from looking for:
<!-- * --> ?

Also Webflow allows for adding informations through custom fields, which is an ideal solution for tagging elements for later render them dynamic or search and replace them.


#6

It can technically work, sure. But, with the current Gulp and Grunt modules for dealing with such things, it would either not work out of the box (where working out of the box is the ideal solution), or it would require customized modules in the workflow toolchain, or at the least additional module configuration.

Do you use any tooling in your workflows @vincent? Curious if you can offer some further insight regarding the OP's topic since he clearly does not require, or has to work-around, a block element wrapping a simple comment.

Personally, I see great use in non-wrapped comments-- especially when handing exported code to others for documentation purposes.

As far as this wish list item being a priority, I'd say it's low. Personally, I'd much rather see the Webflow team focus on an asset manager with folders and deletion, and more importantly, a better way to define non-element-attached classes so we aren't riddling a style guide with empty divs.


#7