SnippetMaster Support Forums
Return to main website
 
March 29, 2007, 09:36:57 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2007, 09:36:57 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: mce_href being placed in the code « previous next »
Pages: [1] Print
Author Topic: mce_href being placed in the code  (Read 163 times)
gotovisual

Posts: 6


[-] mce_href being placed in the code
« on: November 23, 2006, 02:10:08 PM »

Hi All

I've noticed a few people have posted a similar question but can't find an answer..

Basically when I edit a page in snippet

this:

<link rel="stylesheet"  type="text/css" href="./css/default.css" />

becomes:

<link rel="stylesheet"  type="text/css" href="./css/default.css" mce_href="./css/default.css" />

I have noticed that if you open the file, it's ok but if you save the file even if you don't make any
changes, that is when it changes your code?

Any ideas, am I doing something wrong, I think this may be responsible for IE display
differences that only happen after the snippet edit?

Thanks
Darryn
« Last Edit: November 23, 2006, 02:13:09 PM by gotovisual » Report to moderator   Logged
rnomis

Posts: 2


[-] Re: mce_href being placed in the code
« Reply #1 on: November 23, 2006, 02:23:08 PM »

I am sure this is just so you can see the design in preview with the css file reference. Otherwise, all you would see would be the basic page code with no styling. It certainly shouldn't change the appearance in I.E. as all it is doing is linking the style sheet through the mce editor that this part of Snippetmaster is built on.

Maybe I am wrong and I am sure that Henri will put me right!
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 247



[-] Re: mce_href being placed in the code
« Reply #2 on: November 23, 2006, 03:11:48 PM »

Following this I have gone and checked pages on 8 different sites which have been edited using SnippetMaster and in no case is the saved style sheet link any different to how it was originally set up. None of then referenced mce_href in the css link tag.

In the case here, though, the style sheets are both the same, so should not affect the display.
Report to moderator   Logged

Kelvyn
admin
Forum Administrator
*
Posts: 1790

SnippetMaster Author


WWW
[-] Re: mce_href being placed in the code
« Reply #3 on: November 23, 2006, 03:27:37 PM »

The extra element in the link css tag should have no effect on the CSS styles themselves.  Basically, the browser should just ignore any "extra" tags that it doesn't recognize.

The IE display problem is likely caused by something else.  Not sure what would be causing it though.. but IE has many screwy things with the CSS engine, and it isn't unusual for this kind of thing to occur.

1) Does the problem occur ONLY after editing with SnippetMaster?

2) if so, then can you do a "before" and "after" snapshot of the file and compare the differences in the html code?

3) Then, slowly modify the original file.. one change at a time, and see what is making the layout problem occur.

(In other words, it could be how IE is "interpreting" the html formatting.

Report to moderator   Logged
jugjimcos

Posts: 13


[-] Re: mce_href being placed in the code
« Reply #4 on: March 18, 2007, 04:02:52 PM »

I am having the same issue - mce_href being placed in the code

..."stylesheet" type="text/css" href="/bd.css" mce_href="/bd.css" />
<script type="text/javascript" src="/bd.js" mce_src="/bd.js">

Have purchased PRO version for a few sites now....

The problem I have is that my brief from one client is for Valid XHTML 1.0 Transitional. 

The fact that Snippetmaster is inserting these attributes results in invalid xhtml.

Can anything be done to stop this!

Many thanks
Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 247



[-] Re: mce_href being placed in the code
« Reply #5 on: March 18, 2007, 04:19:45 PM »

jugjimcos, is there by any chance a <form> element on the page you are editing? Are you doing a full page edit or making use of snippets?
Report to moderator   Logged

Kelvyn
jugjimcos

Posts: 13


[-] Re: mce_href being placed in the code
« Reply #6 on: March 18, 2007, 04:31:41 PM »

Thanks for your interest.  There is indeed a form element.  The development server is here: test.semlyen.net

Its a search form  that isn't yet doing anything - just looking into the options for it.

I am editing snippets and I *think* even just editing the snippet - which doesn't contain the form - causes the problem.  However I'm not 100% sure - client has the ability to edit the whole page - I should check this and will post back what I find.

I'm struggling with the best way of implementing a "static" web site like this and SM.

I've coded this up as static html pages with SM tags so that SM displays the site as WYSIWYG as possible.  The alternative would have been to build the pages from a number of PHP includes - this would have been easier and better but then SM when editing the "content" file doesn't pick up the style sheet....

There's so much to learn in this business!

Thanks for any comments and help.
« Last Edit: March 18, 2007, 04:35:14 PM by jugjimcos » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 1790

SnippetMaster Author


WWW
[-] Re: mce_href being placed in the code
« Reply #7 on: March 18, 2007, 05:28:36 PM »

The "left over" mce_src tags are actually caused by a bug in the browser.  (I don't think it happens if you use firefox.)

The problem is that the browser is actually "working with" the WYSIWYG editor, and the code that is provided by the browser and then used by the editor is missing a lot of stuff... so the editor has to create some "temporary" tags so it can keep track of things.. and then when you save the changes, it is supposed to put everything back and remove those "extra" mce_src tags.

The problem is that sometimes this doesn't happen, due to the way the browser works.  The "starting code" is different then the "ending code" and so the WYSIWYG editor doesn't realize that those extra tags are... extra.. and so it leaves them in, thinking they're actually part of your code.

There will (eventually) be a new version of Snippetmaster that uses a more recent WYSIWYG editor version, and it should fix this problem.  For now, the good news is that it shouldn't effect browser display of the page at all.. the bad news is that ya, technically is screws up the valid xhtml code.

Report to moderator   Logged
Jenkinhill
Beta Tester

Posts: 247



[-] Re: mce_href being placed in the code
« Reply #8 on: March 19, 2007, 01:59:48 AM »

There is indeed a form element.
In that case the problem is caused because the editor itself runs in a form textbox, resulting in nested forms. The editor tries to track css links but loses its way! The answer is not to include the form element within a snippet, and not allow the client to have full file editor access for that page. It is difficult to work with forms in editable snippets, but it can be done, as long as that form does not conytain a textbox. You have to tell the editor to ignore the form elements, see the last but one message in this thread.
« Last Edit: March 19, 2007, 02:01:34 AM by Jenkinhill » Report to moderator   Logged

Kelvyn
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: mce_href being placed in the code « previous next »
Jump to:  

Powered by MySQL Powered by PHP SnippetMaster Support Forums | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!