Problems after using Visual Editor tab

User 479541 Photo


Registered User
1 post

I have been using Coffee Cup HTML Editor for a long time now. I just noticed a new problem when working on my sites this week. Everything looks fine when I first open the index.php file while in the Code Editor tab. But if I click on the Visual Editor tab and then return to Code Editor again, my code changes drastically! For example, extra lines of code pop up and the title dissappears between the title tags. This never happened before and even after reinstalling Coffee Cup the problem remains.

************ Here is a small sample of the original code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="verify-v1" content="pJemMysTGgPM+a9sWbwsgzr8/EKZMNQ+w3Oi0N8Criw="/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>Pimples | Acne Prevention | Popping - Get Help Here !!</title>
<style type="text/css">
<!--
body,td,th {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
color: #333333;
}
body {
background-image: url(images/BG.jpg);
background-repeat: repeat-x;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #B9C1AA;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css"/>

</head>

<body><!-- Below are the lines that you need to add to enable DHTML popups -->
<script src="http://www.hypervre.com/popup/default.js" type="text/javascript"></script>
<script src="http://www.hypervre.com/popup/hypervre.js" type="text/javascript"></script>
<script language="JavaScript"> uarxskin('copper');</script>



********* Here is what happens afterwards:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE></TITLE>
<META content=pJemMysTGgPM+a9sWbwsgzr8/EKZMNQ+w3Oi0N8Criw= name=verify-v1>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<STYLE type=text/css>
<!--
body,td,th {
font-family: Tahoma, Verdana, Arial;
font-size: 11px;
color: #333333;
}
body {
background-image: url(images/BG.jpg);
background-repeat: repeat-x;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #B9C1AA;
}
-->
</STYLE>
<LINK href="style.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY><!-- Below are the lines that you need to add to enable DHTML popups -->
<SCRIPT src="http://www.hypervre.com/popup/default.js"
type=text/javascript></SCRIPT>

<SCRIPT src="http://www.hypervre.com/popup/hypervre.js"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript> uarxskin('copper');</SCRIPT>



***************************************************************************
Notice the addition of this line also: <META content="MSHTML 6.00.6000.16890" name=GENERATOR>

What causes this? How do I fix it? Plus, all the code gets "smashed" together and gets center-justified in some places.

Thanks in advance.
User 629005 Photo


Ambassador
2,174 posts

There is a discussion about this situation (somewhere in the forums)... I will try to locate and link to it.

Meanwhile, it is due to the way that the 'different' portions of the editor handle the coding. They aren't really meant to be used 'together', as I understand it, and is not anything new (at least not too recently) as I was seeing it a while ago but knew that it wasn't meant to work that way.
Living the dream, stocking the cream :D
User 103173 Photo


VP of Software Development
0 posts

Unfortunately this is a byproduct of going from the Code Editor to the Visual Editor. When you do that, your code will be modified. There is no way to prevent that from happening as the Visual Editor uses a different code set so that your elements can be moved around visually.

What I would suggest is you stick to the code editor and use the Split Screen Preview option instead.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 144025 Photo


Registered User
32 posts

Thanks Scott,
I was going to make the same suggestion. That's what I do! Especially when working with CSS pages that will get major messed up if you switch back and forth between Code Editor and Visual Editor. Using split screen view does make things nice. It might take some getting use to because you have less coding visible, but in the long run it's faster because you can see what you're doing as you go.
Someone was thinking ahead when they included the split screen view in code editor. Geesh, you guys are smart! That's why you make great software!

Rick
Happiness is a cup of coffee and a good mouse.

Rick

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.