Pages: [1] |
|
|
Author |
Topic: mce_href being placed in the code (Read 163 times) |
gotovisual
Posts: 6
|
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
|
|
|
|
rnomis
Posts: 2
|
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!
|
|
|
|
Jenkinhill
|
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.
|
Kelvyn
|
|
|
admin
Forum Administrator

Posts: 1790
SnippetMaster Author
|
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.
|
|
|
|
jugjimcos
Posts: 13
|
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
|
|
|
|
Jenkinhill
|
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?
|
Kelvyn
|
|
|
jugjimcos
Posts: 13
|
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.
|
|
|
|
admin
Forum Administrator

Posts: 1790
SnippetMaster Author
|
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.
|
|
|
|
Jenkinhill
|
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.
|
Kelvyn
|
|
|
|
Pages: [1]
|
|
|
|