Page 1 of 1

blog is deleting "empty" html - how to stop that?

Posted: Mon May 29, 2006 5:54 pm
by sph
hello everyone,
hello garvin ;)

i'm very sorry, but i have to bore you with my stupid little questions. again.

so, what matters:
i'm using the wysiwyg-way to create entries. usually.

but as you can see on http://blog.plastick.org/pages/klick.html i'm using some staticpages, and their content i written "by hand".

so, to make all the things happen i want to, it actually is necessary to add some 'title'-tag to my links and to images, the following one:

Code: Select all

title=""
reason: i've created (by using a very good tutorial) own-designed tooltip-popups for links.

now, to avoid the regular-shown tooltip (which shows the 'title'-tagged text or the url), i have to add this empty tag.

problem:
each time i re-edit the content, this tags are deleted.

i think because they are empty something declares them as "not needed". so everytime i edit this content, i'll have to put this tag to each image and each link, again.

and this is not really what i expected - this should be a link-page! o.0

so, is there a way to disable this behaviour for my staticpages? or generally? or something?

help, ideas, thoughts very welcome!

greets, have nice days,

sph

Re: blog is deleting "empty" html - how to stop th

Posted: Mon May 29, 2006 9:37 pm
by garvinhicking
Hi!

This is caused by the WYSIWYG editor. You can't do much about it, except turning off the WYSIWYG editor.

Maybe using any of the alternate editors tinymce/fckeditor/xinha might do the trick.

But it's a general problem that the WYSIWYG editor needs to parse all HTML elements, and removes attributes it can not properly parse out.

Best regards,
Garvin

Posted: Mon May 29, 2006 9:52 pm
by sph
hi!

so, now i understand why this happens. so, another idea to "fix" this:

is there a way to "deactivate" the wysiwyg only for the staticpages?
in fact i type them all by hand, so this "feature" would be really nice. but... how to manage this?

where?

or is this impossible?

greets,

sph

Posted: Mon May 29, 2006 10:13 pm
by garvinhicking
Hi!

No, such an option is currently not possible. It would also be a bit knifflig to do that, so don't expect that this feature will happen anytime soon. ;)

Since one usually does not modify staticpages so often, can'T you disable your WYSIWYG before you edit staticpages?

Best regards,
Garvin

Posted: Mon May 29, 2006 10:31 pm
by sph
hm, i guess i'll have to live with this.

thanx anyway!

---
update:

i'm bored right this moment, and i like to play. i really don't understand things like "javascript" or similar, so i can really understand if you're like "THEN DON'T FUCKING TOUCH SUCH FILES!"

but i did. (making backups and how-to-txts to remember what i did...)

file: ...\htmlarea\htmlarea.js
line: 904

before:

Code: Select all

902 	switch (mode) {
903 	    case "textmode":
904 		this._textArea.value = this.getHTML();
905		this._iframe.style.display = "none";
906 		this._textArea.style.display = "block";
907 		if (this.config.statusBar) {
908 			this._statusBar.innerHTML = HTMLArea.I18N.msg["TEXT_MODE"];
909 		}
after:

Code: Select all

902 	switch (mode) {
903 	    case "textmode":
904 		
905		this._iframe.style.display = "none";
906 		this._textArea.style.display = "block";
907 		if (this.config.statusBar) {
908 			this._statusBar.innerHTML = HTMLArea.I18N.msg["TEXT_MODE"];
909 		}
... seems to work - no html is changed now when switching from textmode to wysiwyg or vice versa. as i said, just playing, just bored. so, what now? do i have to expect the whole thing to crashdown now, ruin everything, or something? or should i just do this "mod" again, after the htmlarea was updated?


greets ;)

sph

Posted: Tue May 30, 2006 10:18 am
by garvinhicking
Hi!

Hm, I can't tell. I don't use the WYSIWYG editor. But you can test it and tell us if it works properly with entries etc. in the future. :)

Regards,
Garvin

Posted: Tue May 30, 2006 2:04 pm
by sph
:)

hm, okay - could be an idea. i think writing some entries and modifying the staticpages the next few weeks would be enough to tell what happened.

... this is so "exciting"! :D

;)

Posted: Wed May 31, 2006 7:24 pm
by sph
so, a faster report than thought:


do not do this!


:D

this will work for my purposes, yeah. but this will do following, too:

write a text in wysiwyg -> swith to textmode = your text is deleted.

write something in textmode -> switch to wysiwyg -> delete text -> switch to textmode = text is still there.

this behaviour is nothing i like to recommend. and btw, this is only happening to new entries. if you have saved your entry once, you can work as usual with them. (so far as i know now... ;)

so, i can write now entries in wysiwyg-mode without any problem, i can write now staticpages in textmode without any problem - i just have to make sure _not_ to switch to textmode while writing. it would'nt be this good.... ^^