May 20, 2003

It’s been a very long time indeed :p However, the good news is that I’m actually back to working on Blog 8.0 again. I was stuck for a while on how to get hyperlink and image insertions working since the WPTools component only allows the insertion of the actual image or URL – there is no support for additional attributes like target, width, height, id, class etc. I wrote to the WPTools usenet group hoping somebody else might have come across the same problem and found a solution and I found somebody – Nick Crosby. Nick was kind enough to give me a few pointers on the direction that I should follow and after a day of stumbling around I was able to figure out how to insert a hyperlink with extra attributes. In the process, I also modified the hyperlink entry dialog box in Blog so that now you can select a set of default targets from a dropdown list or enter your own target – this should help people working with frames or IFRAMES. I also added a blank field where you can enter any other attributes of your choice as ‘=’ separated values pairs.

The only problem is, that I am not able to get the editing of an already entered URL working properly on the WYSIWYG view 🙁 I can retrieve the actual URL fine, but can’t retrieve the extra attributes since none of the WPTools functions for retrieving the URL support the extra attributes. Bummer! I’ve written back to Nick in the hope that he has encountered this problem too and has figured out a way around this and am waiting on him. In the meantime, I guess I’ll also try to find out how to add extra attributes to images. Of course, since Blog now also has a working HTML view, it is simple enough to edit a hyperlink in the HTML view but what if a user prefers to work in the WYSIWYG view? Shouldn’t they have the flexibility to enter a URL and to edit a URL? I think so. So I’ll try to get that working …

In the meantime, I’m also trying to figure out how to handle images and external file links in the new setup with Blog. Since images will be displayed in the editor only if I retain the external link to them specifying where they reside on the hard disk, I’ll have to retain that information when I save an entry. However, what I used to do with Blog was retain the file information only when the image was first added, automatically upload the image file but store only the file name as a remote reference on the Blog entry. Not sure if that even made sense to a lot of people but anyway, the problem is that the old approach will not work. I have to retain information as to where the image file is on the local hard disk in the database. This will probably mean that I have to parse an entry each time before a publish, find the image tags, convert them to server references and then publish. That’s going to be a bit of extra work and I hate approaches where you have to do repetitive work needlessly – but in this case, I think there is no getting around the need for the extra work. Ah well…

Tags: General
Posted by Fahim at 6:28 am   Comments (4)

4 Responses to

Subscribe to comments with RSS

#1
Gravatar Image
Tyran 20 May 2003 at 7:47 am

Personal preference here, but I strongly dislike WYSIWYG. A preview is all I need. I guess I’m saying that if you can’t fix the problems with the WYSIWYG component that you’ll hear absolutely no complaints from me.

#2
Gravatar Image
jugg 20 May 2003 at 4:12 pm

I wouldn’t know, but why can’t they just delete the existing URL that they want to edit, and add a new one with the corrected values? Doesn’t seem like that big of a deal. Of course I may be missing something here… 🙂

#3
Gravatar Image
Fahim 20 May 2003 at 4:24 pm

Tyran: I agree about the WYSIWYG preference part but a lot of new Blog users aren’t power-users and so they find it easier to work in WYSIWYG mode :-)Anyway, I’ve made the WYSIWYG or plain HTML views user selectable – I mean as to the default. So both camps should be happy :p

jugg: Good to hear from you – even as a comment 🙂 While they can certainly delete the existing URL and add a new one, would you want to retype a whole URL, set the target and extra attributes if all you wanted to do was change one letter on the URL? A lot of people might hate that approach :p

#4
Gravatar Image
mook 23 May 2003 at 4:42 am

Me again. On the HTML/WYSIWYG thing, maybe the Preview window could be editable so it could be the WYSIWYG view? Just a thought, I could be way off base here…

Leave a response

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: