Hello,
I´m trying to customize to my needs some of the functions of the
QuickEdit plugin. In the case of QuickEdit_image, I´m trying to add
support for the resize image plugin syntax:
[img(20%, auto)...
Here´s teh modified script::
**** INSERT IMAGE ****
%/<html><hide linebreaks><a href="javascript:;" class="tiddlyLink"
title="embed an image (jpg/gif/png) - [img[tooltip|URL]] or [img
[tooltip|path/to/file.ext]]"
onclick="var fn=config.quickEdit.promptForFilename('Enter/select an
image file',getLocalPath(document.location.href),'');
if (!fn) return false; /* cancelled by user */
var tip=prompt('Enter a tooltip for this image',''); if (!tip)
tip=''; else tip+='|';
var img_size="20%"
return config.quickEdit.setSelection(this,'[img('+img_size+', auto)
['+tip+fn+']]');"
>image</a></html>
My knowledge of JavaScript is almost nil, but from what I gathered on
the internet, using variables inside an href is tricky.
I defined the variable img_size (not really needed, but I plan to
prompt for the value later), and I enclosed the variable name in +...
+.
Now, when I run the script, it stops with: img_size is not defined
How come? :)
aless
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---