Gossamer Forum
Home : Products : Others : Fileman :

Edit modes

Quote Reply
Edit modes
I am using fileman 2.0.1 and i am having a problem switching from HTML edit to Text edit modes , i can enter tags after <html> and between <body> in text edit mode ok, when i switch to html mode and back to text mode the tags have gone.

any ideas why ?

John
Quote Reply
Re: [varcoe] Edit modes In reply to
Hi,

My answer to this one is not logical, and it's a feature I'd much like to see changed in Fileman since my users do the same all the time.

You CANNOT use the switch to HTML/Text when you want to use both the WYSIWYG editor (named HTML in fileman which confuses my users all the time) and text editing. The way to do it is to first open in the WYSIWYG/HTML mode and while there you do right click in the text you edit and then select "Edit Source" from the list.

I personally think the button "switch to Text" on the top should be taken away since it means loosing changes if you don't save first.

-kjell
---
Kjell Knudsen
http://www.icbl.org
Quote Reply
Re: [varcoe] Edit modes In reply to
Hi,

I looked the script over and over, I could not find the problem that you said.
Are you sure that your fileman is 2.0.1 version?

TheStone.

B.

Last edited by:

TheStone: Mar 11, 2002, 9:52 AM
Quote Reply
Re: [TheStone] Edit modes In reply to
it is FileMan 2.0.1 Released! - February 17, 2002

going from text edit to html edit is ok, it is only when going from html to text edit that tags are lost, ie

<html>

<head>

<title>test page</title>

</head>

<body>

would be changed to

<html><body>

John
Quote Reply
Re: [varcoe] Edit modes In reply to
Hi,

It has this problem on IE 5.5. I'll let you know when I fixed it.

Thanks for your feedback.

TheStone.

B.
Quote Reply
Re: [varcoe] Edit modes In reply to
Hi,


Could you replace retrieveHTML subroutine within template/common/editor.js with the script below:

function retrieveHTML () {
var body = inner_content.innerHTML;
var content = document.frm_main.content.value;
var head = '';
if (content) {
spos = content.search('<head>')
epos = content.search('</head>')
head = content.substr(spos,epos+1);
}
if (body){
var style = /style="BORDER-RIGHT: red 1px dotted; PADDING-RIGHT: 2px; BORDER-TOP: red 1px dotted; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; BORDER-LEFT: red 1px dotted; PADDING-TOP: 2px; BORDER-BOTTOM: red 1px dotted"/gi;
body = body.replace(style,'');
var bgColor = inner_content.bgColor;
var html = '<html>\n';
if (head) html += head;
if (bgColor) body = html + '<body bgcolor="' + bgColor + '">\n' + body + '\n</body>\n</html>';
else body = html + '<body>\n' + body + '\n</body>\n</html>';
document.frm_main.content.value = body;
}
}

That should fix this problem.

TheStone.

B.
Quote Reply
Re: [TheStone] Edit modes In reply to
hi

i replaced the retrieveHTML subroutine and it has fixed the problem.

many thanks

John
Quote Reply
Re: [varcoe] Edit modes In reply to
hi

there is still a small problem with the code, now when i switch from html to text edit it removes the contents of the body tag ie

<body bgproperties="fixed" background="/images/back56.gif">

changes too

<body>

John
Quote Reply
Re: [varcoe] Edit modes In reply to
i have found another problem, because the <body> tag info was being removed i added this into the head tag

<LINK href="http://www.ja-designs.com/mystyles.css" rel=Stylesheet type=Text/css></link>


now every time i switch from html to text edit it will add another copy of the stylesheet after the body tag

<body>

<LINK href="http://www.ja-designs.com/mystyles.css" rel=Stylesheet type=Text/css></link><LINK href="http://www.ja-designs.com/mystyles.css" rel=Stylesheet type=Text/css></link>


John
Quote Reply
Re: [varcoe] Edit modes In reply to
Hi,

Could you download two attached files which were fixed that problem.

TheStone.

B.
Quote Reply
Re: [TheStone] Edit modes In reply to
hi

i downloaded the 2 file, and install them, and so far so good, no more problems.

John