An Atom plugin to facilitate insertion of images in an AsciiDoc document.
Create an image file, in the specified folder, that is named after the AsciiDoc file it is pasted into, and insert an image reference to that file into the editor.
Originally forked from markdown-image-helper.
The default setting is to place copied and created a folder named images
in the same folder as the document.
Another default setting is to expect that the :imagesdir:
attribute is not set in the document (or through cli) and sets the 'Append Images Folder' setting to true
. This setting will append the Images Folder path to the filename in the image:[]
macro so that AsciiDoctor knows where to find the files.
NOTE: To increase flexibility for moving your images folder, and to also reduce the repetition of hard coded image folder strings in the document; it is recommended to set the :imagesdir:
attribute for your document to match the 'Images Folder' setting in this package and to disable the 'Append Images Folder' option.
This way, the package will know where to place your image files, and asciidoctor will know where to find them.
If you want to move your folder of images into a new directory called something like assets
you would change the Folder Location string to assets/images
, and set this same thing as the value of the :imagesdir:
attribute in the document.
Make sure the setting to 'Append Images Folder' is not checked.
Now everything should just work as expected in the new location, without requiring a Find/Replace operation over all of the documents that have hard coded the images folder into the image macros.
Use PrintScr
to capture your entire desktop.
Use Alt + PrintScr
to capture the active window.
Shift
and right-click
with your mouse.Use Command-Shift-Control-4
to capture the image data to the clipboard.
Right-click
(or Control+Click
, or a Two-Finger click on trackpads) on the file in the Mac Finder.Settings/Preferences > Install > Search for asciidoc-image-helper
or
apm install asciidoc-image-helper
Special thank you to Ludovic Fernandez 'ldez' for turning this package into a legit project. I am learning a lot from his pull requests.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.