cwb
January 13, 2012
4:57pm
It would be very helpful to be able to include comments and white space and new-lines in the html code generated by the contect editor. At the moment I am able to do this only if I create a new format called "Raw HTML" as suggested in another forum post. However, in this format I do not get the wysiwyg view. There are times when I have tweaked the html and would like to add a comment or I have a very large page and would like to break it up visually so I can more easily look at the code.
Perhaps this is already possible but I haven't been able to figure out how to do it.
Comments
5:51pm
Hello cwb,
It is possible to use comments if you choose the Full HTML option. You could switch back and forth between the WYSIWYG and HTML tabs. See this series of screenshots:
http://screencast.com/t/r04QLEFmq
http://screencast.com/t/RvUp1Nft4
http://screencast.com/t/vvU6oxqx7oS0
The big difference between using Full and Raw formats is that the Raw format gives you the ability to have line breaks like you would have in a text editor. Once you create space in the markup using the HTML tab in the Full type, and then switch back to the WYSIWYG and then back again, your spacing will be lost.
My recommendation is to use a text editor. Tweak your markup that way and then copy and paste into the Gardens environment.
Having those more restricted text formats limits what some users can do on your site. You may be the only one on this site that adds anything, but for many other sites, having this restriction is important.
Best regards,
Dave | Drupal Gardens Client Advisor
1:02pm
Thanks. That was helpful. If I switch between wysiwig and Raw will I also lose my line breaks?
1:04pm
cwb,
You won't lose the line breaks if you use Raw.
Best regards,
Dave | Drupal Gardens Client Advisor
1:11pm
Hmmm, I tried editing a page in Raw mode. When I switched to wysiwyg and back to Raw the breaks were gone. (the comments stayed).
Is there any disadvantage to leaving the line breaks in? It just makes the code more readable.
Also, it would be nice if when in the editor you could position your cursor in a location on the page in wysiwyg mode and then preserve that location when switching to html mode. Would make code editing easier.
1:35pm
cwb,
That's the behavior that happens when switching between the two formats.
I'll often use a separate text editor to work with the HTML and then copy and paste into the Gardens site when I am ready.
Your last point is noted and it would be nice, but not a feature that is available. I recommend using a text editor as mentioned above.
Best regards,
Dave | Drupal Gardens Client Advisor