Re: [BlueGriffon] editor strips away code

559 views
Skip to first unread message

Daniel Glazman

unread,
May 23, 2013, 11:50:36 AM5/23/13
to blueg...@googlegroups.com
On 23/05/13 17:09, Morris wrote:
> Whenever i include de folowing code in to the source: /*<li><a
> href="index.html"><i class="icon-home icon-white"></i>Home</a></li>*/
> The editor throws away the folowing part of the code: *<i
> class="icon-home icon-white"></i>*
> So i end up with the folowing code**/*<li><a
> href="index.html">Home</a></li>*/
> /*
> */
> This happens when I switch from source view to wysiwyg view, and back
> again to source view. Gone is the code.
> This is so frustrating. The last version of bluegriffon did not have
> this problem.
> Is there a solution to this problem?

I'll investigate the issue. BlueGriffon's front-end is not responsible,
the guilty code is in Mozilla Gecko's core.

</Daniel>


Alex Paton

unread,
May 29, 2013, 7:12:56 AM5/29/13
to blueg...@googlegroups.com
Daniel / Morris

Wouldn't it be better to add the class to the <a> tag, rather than an empty <i> tag? Seems like a strange way to use an <i> tag to me, so doesn't surprise me that a web editing program would throw it out. It doesn't delete the code if you change it to <span> tags.

Alex

Philip Goddard

unread,
Jan 31, 2015, 10:16:18 AM1/31/15
to blueg...@googlegroups.com
This issue is still with us in the current BG version, and it is now a major headache for me, making me really want to jettison BG, except that detailed searches have failed to find a workable alternative for my purposes.

The problem appears to be the deleting of *any* empty tags - and my problem is now that I've put Facebook buttons on my many pages, and BG deletes them because they are seen as empty tags. For example, the FB 'Like' button code (apart from the connected Javascript bit) that I'm using is:

<div class="fb-like" data-href="http://www.clarity-of-being.org/index.htm" data-width="200" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>

Now, I've sought to get round this by putting a non-breaking space between the opening and closing tags. However, that causes an additional blank line in the displayed page. I'm able to compensate for that where the button code itself goes, though I don't know for sure that it won't cause malfunction of the button display on some browsers (Facebook aren't exactly forthcoming in giving such information), but there is another empty div with an ID, which has to be placed immediately above the piece of Javascript, immediately below the <body> tag, and this is causing a blank line above the masthead of each page, and I most certainly don't want that, and I don't know a way of closing up that blank line.

The real answer, undoubtedly, is to stop BG deleting empty tags, at least without the user having requested that action. I'd so much appreciate something being done about this!

Philip.

Peter Payne

unread,
Feb 1, 2015, 8:16:46 AM2/1/15
to blueg...@googlegroups.com

Yes, the small bugs are hard to work around. Sadly the "crash" of WYSIWYG editors means using BG or switching to tools that haven't changed significantly since they were made, up to 15+ years ago.  
 

Dominik Lenné

unread,
Feb 1, 2015, 9:04:22 AM2/1/15
to blueg...@googlegroups.com

Peter Payne

unread,
Feb 1, 2015, 10:20:38 AM2/1/15
to blueg...@googlegroups.com
Oo, can I make entries into Bugzilla and have them addressed? I’m sure I’ve got some bugs I could contribute to the project.

Greg Chapman

unread,
Feb 1, 2015, 7:28:46 PM2/1/15
to blueg...@googlegroups.com
Hi Philip,

On 31 Jan 15 15:16 Philip Goddard <mym...@philipgoddard.com> said:
> I've sought to get round this by putting a non-breaking space
> between the opening and closing tags. However, that causes an
> additional blank line in the displayed page.

It's true that empty tags tend to generate validator warnings rather
than errors, but, in the main, you're better off without them.

All sorts of code providers offer code snippets to embed in a site
that will not be compliant with the doctype used. There's a couple of
solutions for empty tags that I can think of:

1. Put an empty comment in there? <!-- --> not something that
occupies display space.

2. Put in the &nbsp; but use

<style type="text/css">div.fb-like {display: none;}</style>

depending on circumstances.

Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer and The GIMP
Still exploring BlueGriffon

Philip Goddard

unread,
Feb 2, 2015, 4:53:35 AM2/2/15
to blueg...@googlegroups.com
Many thanks, Greg, for those seriously useful suggestions.

I just tried the comment option, and that causes the buttons to disappear - as also does putting a tiny transparent gif image between the open and close tags - so it looks as though I have to stay with &nbsp; . However, I won't try invisibility because I got my fingers burnt some years ago, when one site of mine lost ALL its human traffic over about half a year, apparently because of search engines heavily penalizing it for what they 'saw' as unethical SEO practice.  What I'd actually done was to add a hidden spambot trap link on each page. So nowadays for safety I prefer to avoid anything having invisibility attributes of any kind.

Anyway, I was able to improve the situation and get rid of the blank line above my pages' masthead.  I re-read the Facebook instructions for inserting the Like button code, and I saw that actually they said that the Javascript code would "ideally" be immediately following the <body> tag - in other words it didn't actually *have to* be in that specific position.  So, I moved the JS code down to immediately below the masthead and main navigation bar, and immediately before button tags and the page body content's container div. There the little extra blank line space doesn't interfere really significantly.

Philip.
Reply all
Reply to author
Forward
0 new messages