asciidoctor / atom-asciidoc-preview

⚛ AsciiDoc preview for the Atom editor.
https://atom.io/packages/asciidoc-preview
MIT License
142 stars 42 forks source link

Preview of Asciidoc File Shows Blank in Atom. #317

Open PB-C opened 1 year ago

PB-C commented 1 year ago

Description

The preview of asciidoc files in atom display a blank page. Can you please help here.

Screenshots

image

Your syntax example.
ianwillie commented 1 year ago

I have found a way round this problem. Asciidoc-preview renders text fine in atom v1.60 but not in v1.63, the latest and last version. I use manjaro linux but the following should work in most linux flavours. A similar process will work with AppImage. There must be a similar way in MS products but I have not used these for years so cannot help here. However, downgrading atom from v1.63 to v1.60 should be possible.

In linux from the terminal I use the flatpak version. We need to install flatpak first. This can be done from the package manager.

Then install atom with "flatpak install io.atom.Atom". This will install atom v1.63.

(See this for details of downgrading or choosing flatpak version: https://itsfoss.com/downgrade-flatpak-packages/)

In the terminal run "flatpak remote-info --log flathub io.atom.Atom" You will see various versions you want the one dated 20221008

   Commit: cea629ca495e72d577eae4e64bff902ead937564bc67be7fd6d584554be3de36
      Subject: Add zypak to launch script rather than dropping it (422bb1d5)
      Date: 2022-10-08 22:46:12 +0000

Downgrade to that version with with command: "sudo flatpak update --commit=cea629ca495e72d577eae4e64bff902ead937564bc67be7fd6d584554be3de36 io.atom.Atom"

Now run "flatpak run io.atom.Atom" and you will see version 1.60 and Ctl-Shift-A should call asciidoc-preview and render correctly.

To use the dev tools with Ctl-Shift-I you probably need to add --no-sandbox or the tools panel will not open like "flatpak run io.atom.Atom --no-sandbox"

Run apm with "flatpak run --command=apm io.atom.Atom list --installed --bare" to see installed packages. To install a new package "flatpak run --command=apm io.atom.Atom install "

(More details of all this can be found in https://github.com/pulsar-edit/pulsar/issues/256 Now that atom has been sunset by MS the pulsar community has taken on the task of developing atom into the future as an open source project. However, the first version of pulsar is based on atom v1.63 and will not render asciidoc-preview. A solution to this is being sought and may be connected the the version of nodejs being used. Watch the pulsar url above.)

If you cannot find the packages you want they can be got from pulsar site. Just copy the packages from /home//.pulsar/packages/ to /home//.atom/packages/ . BUT do this at your own risk but it should work.

I will add more details to this comment later when I review it shortly. I hope this helps.