Forums

This topic is locked

Creating new "commands" in UD

Posted 18 Apr 2001 09:59:00
1
has voted
18 Apr 2001 09:59:00 Steve Davis posted:
Hey everyone,

I am not sure why, but UD does not include "justify" as a text alignment option. Perhaps it is not part of the official language standard.

I have worked out how to show "justify" in the menus, but it doesn't do anything in the code.

I have put

<menuitem name="_Justify" enabled="true" command="dw.getDocumentDOM().setTextAlignment('justify')" checked="dw.getDocumentDOM().getTextAlignment() == 'justify'" id="DWContext_Text_Alignment_Justify" />

into menus.xml. But it seems that ="dw.getDocumentDOM().setTextAlignment('justify')" doesn't hook in anywhere.

Anyone have any idea if it is possible to create "new" commands in DW.

If so, how?

Me? I can't even spell ASP!

Replies

Replied 18 Apr 2001 13:23:21
18 Apr 2001 13:23:21 Waldo Smeets replied:
Microbe,

justify is not understood by all browsers types. Maybe that's why it's not included in dreamweaver.

Your menu changes seem to be ok when you don't know how the setTextAlignment() functon works. But I have searched this in the Extending Dreamweaver documentation and it says:

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>dom.setTextAlignment()
Availability: Dreamweaver 3.0

Description: Sets the ALIGN attribute of the block that contains the selection to the
specified value.

Arguments: alignValue, alignValue must be "left", "center", or "right".
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

This means so much as: the function doesn't understand the parameter "justify". I have taken a look in the configuration folder, but the setTextAlignment() function is not defined in a js file so I can't try to build a new version for you.

I could try to do a workaround, but that probably would take lots of time to do. So I'm not giving it a try <img src=icon_smile_wink.gif border=0 align=middle>, I'm sure you understand that.

Waldo Smeets - www.UDzone.com Webmaster
------------------------------------------
www.UDzone.com : A Dreamweaver, Ultradev and Fireworks recourse site for developers
by developers.
------------------------------------------
Replied 19 Apr 2001 05:45:41
19 Apr 2001 05:45:41 Steve Davis replied:
Thanks Waldo,

I although I don't know a lot about extensions, I came to the same conclusion as you and I appreciate you checking it.

Couple of things. I did not receive email notification about your reply though it was set to "on" I think.

Also, typo in your sig - it's reSourCes

Me? I can't even spell ASP!
Replied 19 Apr 2001 09:46:47
19 Apr 2001 09:46:47 Waldo Smeets replied:
<img src=icon_smile_big.gif border=0 align=middle> I changed my sig, thanks.

About the mail notification: it works fine for me, so maybe it wasn't checked, or your email is not set properly in your profile I think.

Thanks for the feedback.

Waldo Smeets - www.UDzone.com Webmaster
------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
------------------------------------------
Replied 20 Apr 2001 01:59:25
20 Apr 2001 01:59:25 Steve Davis replied:
Well, it worked this time, so not sure.

The only thing I can think is that my wife grabbed the email at home and I never got to see that message <img src=icon_smile_dissapprove.gif border=0 align=middle>

About the mail notification: it works fine for me, so maybe it wasn't checked, or your email is not set properly in your profile I think.

Thanks for the feedback.

Waldo Smeets - www.UDzone.com Webmaster
------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
------------------------------------------


Me? I can't even spell ASP!

Reply to this topic