1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

New version of Insert Image add-on

New version of Insert Image add-on

Postby rickenbroc » Sat Feb 23, 2013 4:32 pm

Maybe some of you have followed the thread in Mantis about the "insert inline image add-on"
here.
The wishes were to be able to :
- modify an inserted image
- support insertion of svg format images in node core and details
- see some kind of preview of the image
- collapse all the kind of images insertion in one unique dialog box

What I reveal here is an in progress work that supports :
- the modification of an existing image (size or link)
- the displaying of a preview pane when inserting an image (working with windows 7 now)

The final purpose is to propose a functionnal prototype of what could become an endemic feature of freeplane.

The script can be downloaded here: insertInlineImage.groovy

To install it, open Tools>User directory and copy the inserInlineImage.groovy file in the script folder.
Restart freeplane and you can run the script on the current node by Tools>Script>Insert Inline Image>Execute...

Please test it and report any bug you could find.

Rickenbroc
rickenbroc
 
Posts: 55
Joined: Mon Aug 22, 2011 8:14 am

Re: New version of Insert Image add-on

Postby abc163 » Sat Feb 23, 2013 5:30 pm

Since I already installed the "InsertInlineImage-v0.9.8.addon", I had to uninstall it before I could copy the new version into the scripts folder and show it onto the Tools --> Scripts. However, when I clicked the "Execute...", an alert popped up (pls see the attached photo). I clicked "OK" to close it, and clicked the buttons on the Insert Image dialogue window, but no response. Anything wrong with my installation? My OS is XP sp3 and FP 1.2.21.rc. Thanks for your work!

abc
Attachments
insert_inline_image.png
(37.37 KiB) Downloaded 18 times
abc163
 
Posts: 53
Joined: Mon Dec 24, 2012 1:09 am

Re: New version of Insert Image add-on

Postby rickenbroc » Sat Feb 23, 2013 8:44 pm

hello abc163,

Curiously, this error message is displayed if the file you try to insert is invalid (at least its path). But only after having clicked the OK button.
So if you see this message at launch, I suspect that your copy of the script is corrupted.

I have uploaded the script here.
Please have an other try with this one (unzip it in the script folder) an tell me if it's allright.
Normaly, you do not need to uninstall the add-on. Replacing the former groovy file by the new one is enough, howerver you'll need to restart freeplane.
Attachments
insertInlineImage.groovy.zip
(6 KiB) Downloaded 14 times
rickenbroc
 
Posts: 55
Joined: Mon Aug 22, 2011 8:14 am

Re: New version of Insert Image add-on

Postby abc163 » Sun Feb 24, 2013 12:28 am

The script is not corrupted. I tried the zip and it's the same. I think it's the setting of my FP. After I checked some "Not recommended" checkboxes on the Scripting in Preferences, the alert pop-up did not show up anymore and buttons responded. Sorry about the trouble. And now I can resize images visually when I insert an image. But how can I modify an existing image using the script? I do not find that feature. And the old version must be deinstalled before the new version groovy is copied into the folder; otherwise the "Insert Inline Image" does not show on the Tools menu in my FP.
abc163
 
Posts: 53
Joined: Mon Dec 24, 2012 1:09 am

Re: New version of Insert Image add-on

Postby anatolica » Sun Feb 24, 2013 4:45 am

rickenbroc, thanks for all your efforts :) however, I could not install any of the versions you posted here into the newly released Freeplane v 1.2.22, either due to the add-on or Freeplane. It gives "Could not open URL file ..." error, FYI.

Edit: Oops, sorry; I thought it was in add-on format so tried to 'install' it. Now that I copied the script to my scripts folder, it works -however, did not let me alter the image dimensions by keyboard, but I think this is more likely to be related with either Freeplane 1.2.22 or my settings (Freeplane did not let me to change the file name in the first instance, either). I am looking deeper into it now,

Thanks a lot, by the way, the resize preview seems excellent!

Best,
Ayca
anatolica
 
Posts: 38
Joined: Tue Aug 16, 2011 3:26 pm

Re: New version of Insert Image add-on

Postby rickenbroc » Sun Feb 24, 2013 1:27 pm

well, I'm glad that you managed to install the script.
I did not implement the adjustments by keyboard yet, but it should not be too difficult.
So far I have implemented the insertion in the note too, but I have still troubles with the image as an external object.
The image currently selected, you see it in the preview as far as it is not a svg, can be modified in size and its links.
At this stage, you can not add the same image several times. This is an on going feature.
There are still some improvements I'll implement, so Stay tuned !
rickenbroc
 
Posts: 55
Joined: Mon Aug 22, 2011 8:14 am

Re: New version of Insert Image add-on

Postby boercher » Sun Feb 24, 2013 11:05 pm

but I have still troubles with the image as an external object

Yes, handling of external objects had an issue which will be fixed only in upcoming 1.2 and 1.3 previews (see Mantis #1909).
@rickenbroc let me know if I can help.
Volker
boercher
 
Posts: 638
Joined: Tue Jul 26, 2011 7:13 am

Re: New version of Insert Image add-on

Postby quinbus » Mon Feb 25, 2013 5:28 pm

A general question: The URL chooser for this script displays an "Open" dialog from which I can browse for the file I want to select. This open dialog only allows me the option of viewing the files as "list" or "details."

It would be helpful if the dialog allowed me to choose to see the files as thumbnails or icons. In directories with many image files, it's difficult to find the file I want to load into a node by filename only.

Is the construction of the script's URL chooser something that is optioned by the way the javatool is constructed, or are the options displayed in the dialog box a function of the operating system on which FP is running (in my case, windows)?

Just curious if there is a way to include the include an option for viewing files by thumbnail.

Q!

@rickenboc, Two observations: 1) I'm no longer experiencing the image strobing problem we previously discussed over in Mantis. 2) I'm not seeing an option in the zipped file you shared to include an image in the notes container. I wasn't sure if your reference in the message above was to say the option is functional at this time or if you are still working on it (isn't yet available). If the former, I just wanted to provide the feedback that I'm not seeing anything on the user interface that would suggest it as an option. Thanks again for your work! I use this application multiple times each week! Much appreciated!
quinbus
 
Posts: 223
Joined: Wed Jul 27, 2011 4:04 am

Re: New version of Insert Image add-on

Postby rickenbroc » Mon Feb 25, 2013 7:15 pm

Hello,
You will find below a new version that includes all the scheduled functionnalities except the insertion of the same image several times (I'm on it.;)
I have also added a defautl filter on images files types (gif, jpg, png and svg) and a small raster image preview in the file chooser box.
Rickenbroc
Attachments
insertInlineImage.zip
(6.64 KiB) Downloaded 17 times
rickenbroc
 
Posts: 55
Joined: Mon Aug 22, 2011 8:14 am

Re: New version of Insert Image add-on

Postby quinbus » Mon Feb 25, 2013 10:34 pm

Rickenboc,

Super! The little raster image is beautiful! Thanks.

Just FYI, The notes options works exactly as billed. The extension option doesn't work in my installation (Windows 7). Tried a couple of times.

Hmmmm. So now we have three different containers for images (and a fourth in process!) We're all going to have to rethink how to use images in the various containers... Core, Details or Notes? I'm just going to have to play a little bit with both to see which one makes sense in which situation...

Thanks!

Q!
quinbus
 
Posts: 223
Joined: Wed Jul 27, 2011 4:04 am

Next

Return to Open Discussion

Who is online

Users browsing this forum: fnatter and 2 guests

cron