Coder Social home page Coder Social logo

asciidocfx / asciidocfx Goto Github PK

View Code? Open in Web Editor NEW
1.8K 1.8K 295.0 1.11 GB

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)

Home Page: http://www.asciidocfx.com/

License: Apache License 2.0

Java 84.42% CSS 14.47% Perl 0.24% Batchfile 0.18% Python 0.69%
asciidoc asciidoctor ditaa docbook java javafx javascript mathjax mathml mermaid plantuml

asciidocfx's Introduction

Asciidoc Editor based on JavaFX 20

Features

  • Real-Time Preview

  • Multi-platform (Windows, Mac, Linux)

  • Creating Asciidoc Books

  • Creating PDF, HTML, Epub, Mobi, Docbook

  • Epub Viewer

  • External Browser Support

  • Table Generator

  • MathJax Extension

  • PlantUML Extension

  • Mermaid Extension (Experimental)

  • ditaa Extension

  • Filesystem Tree Extension

  • JavaFX Charts Extension

  • Source Code Highlighter

  • Reveal.js Converter

  • Deck.js Converter

  • Nashorn support

  • Pseudo Terminal Emulator

  • Themeing (Dark & White) _New _

Pseudo Terminal Emulator

Pseudo Terminal Emulator

How to Install AsciidocFX

There are a number of operating systems that AsciidocFX supports.

Note
The latest releases are available from the Github releases page.

Supported Operating Systems and Builds shows the list of available builds with links for reference. If you are looking for the very latest version, visit the link in the note above to be guaranteed of downloading the latest and greatest version of AsciidocFX.

Note
Thanks install4j small for providing us open source license for the installers used in AsciidocFX distribution.
Note
In all releases we use AdoptOpenJDK JREs, so you will not have any licensing issue regarding bundled JRE.
Table 1. Supported Operating Systems and Builds
OS Filename

Mac

AsciidocFX_Mac.dmg

Mac M1

AsciidocFX_Mac_M1.dmg

Windows

AsciidocFX_Windows.exe

Windows

AsciidocFX_Windows.zip

Linux

AsciidocFX_Linux.tar.gz

Linux DEB

AsciidocFX_Linux.deb

Linux RPM

AsciidocFX_Linux.rpm

Install on Linux

You can install AsciidocFX through the Deb or Rpm installers or via Archive file.

Archive file
$ tar –xvzf AsciidocFX_Linux.tar.gz
$ cd AsciidocFX/bin
$ chmod +X ./AsciidocFX
$ ./AsciidocFX

Install on Windows

Download executable/installer and run it.

Install on Mac

Download the .dmg and run it.

or

Use Homebrew to install it with one command: brew install --cask asciidocfx

AsciidocFX Backends

AsciidocFX can converts Asciidoc documents into HTML, PDF, EPUB3 and DOCBOOK5.

AsciidocFX converts documents via AsciidoctorJ library. For the PDF backends alternatively Docbook → Fop → PDF conversion can be utilized.

AsciidocFX Extensions

AsciidocFX supports many extensions like PlantUML, Ditaa, Charts, File Trees and many others Asciidoctor Diagram which can be found in https://docs.asciidoctor.org/diagram-extension/latest/

PlantUML Extension

You can fulfill your UML needs with AsciidocFX. It supports PlantUML. AsciidocFX converts this textual UML elements as png or svg image.

PlantUML is a component that allows to quickly write :

  • Sequence diagram,

  • Usecase diagram,

  • Class diagram,

  • Activity diagram, (here is the new syntax),

  • Component diagram,

  • State diagram,

  • Object diagram.

  • wireframe graphical interface

.UML Diagram Example
[uml,target="uml-example"]
--
abstract class AbstractList
abstract AbstractCollection
interface List
interface Collection

List <|-- AbstractList
Collection <|-- AbstractCollection

Collection <|- List
AbstractCollection <|- AbstractList
AbstractList <|-- ArrayList

class ArrayList {
  Object[] elementData
  size()
}

enum TimeUnit {
  DAYS
  HOURS
  MINUTES
}

annotation SuppressWarnings
--
uml example
Figure 2. UML example output
Note
In some UML elements, PlantUML needs to work with Graphviz. Because of this, you should install Graphviz manually for your platform. After installing Graphviz, you should set GRAPHVIZ_DOT environment variable to dot executable in Graphviz.

Mermaid Extension

Mermaid lets you create diagrams using text and code. This simplifies the maintenance of complex diagrams. See more examples: https://mermaid-js.github.io/

Note

mermaid-cli has to be installed for mermaid diagrams generation.

npm install @mermaid-js/mermaid-cli
[mermaid,target="mermaid-graph"]
--
graph TD
    A[Start] --> B{Is it?};
    B -- Yes --> C[OK];
    C --> D[Rethink];
    D --> B;
    B -- No ----> E[End];
--
mermaid graph
[mermaid,target="mermaid-flowchart"]
--
flowchart TB
    c1-->a2
    subgraph one
    a1-->a2
    end
    subgraph two
    b1-->b2
    end
    subgraph three
    c1-->c2
    end
    one --> two
    three --> two
    two --> c2
--
mermaid flowchart

ditaa Extension

AsciidocFX supports ditaa diagrams.

ditaa is a component that converts diagrams drawn in ascii art to bitmap graphics.

.ditaa Diagram Example
[ditaa,target="ditaa-example"]
--
    +--------+   +-------+    +-------+
    |        |---+ ditaa +--->|       |
    |  Text  |   +-------+    |diagram|
    |Document|   |!magic!|    |       |
    |     {d}|   |       |    |       |
    +---+----+   +-------+    +-------+
        :                         ^
        |       Lots of work      |
        +-------------------------+
--
ditaa example

MathJax Extension

MathJax is an open source JavaScript display engine for mathematics that works in all browsers.

You can use Tex or MathML languages for describing mathematical formulas in AsciidocFX. AsciidocFX converts this textual formulas as png or svg image.

For Example (Tex)
[latexmath,target="tex-formula"]
--
\begin{align}
\dot{x} & = \sigma(y-x) \\
\dot{y} & = \rho x - y - xz \\
\dot{z} & = -\beta z + xyp
\end{align}
--

Tex output

tex formula
For Example (MathML)
[mathml,target="mathml-formula"]
--
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mi>x</mi>
  <mo>=</mo>
  <mrow>
    <mfrac>
      <mrow>
        <mo>&#x2212;</mo>
        <mi>b</mi>
        <mo>&#xB1;</mo>
        <msqrt>
          <msup>
            <mi>b</mi>
            <mn>2</mn>
          </msup>
          <mo>&#x2212;</mo>
          <mn>4</mn>
          <mi>a</mi>
          <mi>c</mi>
        </msqrt>
      </mrow>
      <mrow>
        <mn>2</mn>
        <mi>a</mi>
      </mrow>
    </mfrac>
  </mrow>
  <mtext>.</mtext>
</math>
--

MathML output

mathml formula

Filesystem Tree Extension

You can represent filesystem tree in following tree block. There is two style of FS tree.

[tree,target="tree-view"]
--
#src
##main
###java
####com
#####kodcu
######App.java
###resources
####css
#####style.css
####js
#####script.js
####images
#####image.png
--

Filesystem Tree output

When you drag and drop a folder to editor, AFX will generate this like tree automatically.

tree view
[tree,target="tree-view-new"]
--
root
|-- photos
|   |-- camp.gif
|   |-- festival.png
|   `-- balloon.jpg
|-- videos
|   |-- car-video.avi
|   |-- dance.mp4
|   |-- dance01.mpg
|   |-- another video.divx
|   `-- school videos
|       `-- firstday.flv
|-- documents
|   |-- jsfile.js
|   |-- powerpoint.ppt
|   |-- chapter-01.asc
|   |-- archive-db.zip
|   |-- .gitignore
|   |-- README
|   `-- configuration.conf
`-- etc.
--

Filesystem Tree output (new)

tree view new

JavaFX Charts Extension

JavaFX has 8 kind of Chart component and AsciidocFX supports all of them.

Pie Chart

secim 2014 pie
[chart,pie,target="secim-2014-pie",opt="title=2014 YEREL SEÇİM SONUÇLARI"]
--
AKP,  45.6, orange
CHP,  27.8,red
MHP,  15.2
BDP,  4.2
SP,  2
--

Area Chart

[chart,area,target="area-chart"]
--
//April
1,  4
3,  10
6,  15
9,  8
12, 5

//May
1,  20
3,  15
6,  13
9,  12
12, 14
--

For other charts and available options, look at Chart extension wiki page!

How to Build AsciidocFX

  1. Firstly, install JDK 17

  2. Download Apache Maven and set /bin directory to environment variables

  3. Enter AsciidocFX directory and run $ mvn clean install

  4. Follow to target/appassembler/bin directory and you will see asciidocfx.sh and asciidocfx.bat

Note
We are generating builds with Github Actions automatically.

Books Written with AsciidocFX

Slides (Reveal.js)

AsciidocFX supports slides by using the Asciidoctor Reveal.js backend. To getting start with slide authoring, you can just follow New  Slide menu.

new slide
Figure 3. New  Slide

After that AFX will prompt you a freespace directory name and "OK" you will see the slide demo.

slide demo
Figure 4. Slide demo

You can easily switch between reveal.js and deck.js by changing the comment below. Also, you can configure default settings by editing _settings_reveal.adoc and include::_settings_deck.adoc.

include::_settings_reveal.adoc[]

Used Technologies

AsciidocFX uses Java, JavaScript and XML related technologies.

  • Java FX 18

  • AsciidoctorJ

  • Asciidoctor.js (Deprecated)

  • Spring Boot

  • Spring WebSocket

  • Docbook

  • Apache Fop

  • Saxon 6.5

  • Ace editor

AsciidocFX Configuration

You can configurate AsciidocFX with Settings page (Press Ctrl+F4). The all configs located in [Install_Dir]/conf folder.

Editor Shortcuts

Editor in AsciidocFX is based on Ace.js ( https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts ) . AsciidocFX supports the keyboard shortcuts listed below. All are configurable under Settings > Shortcut settings. Keyboard events are handled by AsciidocFX, if you any reason want it handled by Ace.js itself, you can disable "Custom Shortcut Handler" in settings.

Description Shortcut (Win/Linux) Shortcut (Mac) Command Name

Add cursor above

Ctrl+Alt+Up

Ctrl+Alt+Up

addCursorAbove

Add cursor above (skip current)

Ctrl+Alt+Shift+Up

Ctrl+Alt+Shift+Up

addCursorAboveSkipCurrent

Add cursor below

Ctrl+Alt+Down

Ctrl+Alt+Down

addCursorBelow

Add cursor below (skip current)

Ctrl+Alt+Shift+Down

Ctrl+Alt+Shift+Down

addCursorBelowSkipCurrent

Add new line after the current line

Command+Return

Command+Return

addLineAfter

Add new line before the current line

Command+Shift+Return

Command+Shift+Return

addLineBefore

Align cursors

Ctrl+Alt+A

Ctrl+Alt+A

alignCursors

Append Heading

Ctrl+H

Ctrl+H

add-heading

Backspace

Shift+Backspace OR Backspace

Ctrl+Backspace OR Shift+Backspace OR Backspace OR Ctrl+H

backspace

Block indent

Ctrl+

Ctrl+

blockindent

Block outdent

Ctrl+[

Ctrl+[

blockoutdent

Bold selection

Ctrl+B

Command+B

bold-selected

Center selection

Ctrl+L

centerselection

Change language mode…​

Command+K OR Input+M

Command+K OR Input+M

modeSelect

Codify selection

Ctrl+Shift+C

Command+Shift+C

codify-selected

Copies the selection in editor

Ctrl+C

Command+C

copyX

Copy Lines Down

Ctrl+D

Command+D

copylinesdown

Copy lines up

Alt+Shift+Up

Command+Option+Up

copylinesup

Cuts the selection in editor

Ctrl+X

Command+X

cutX

Delete

Delete OR Ctrl+D OR Shift+Delete

Delete OR Ctrl+D OR Shift+Delete

del

Duplicate selection

Ctrl+Shift+D

Command+Shift+D

duplicateSelection

Expand to line

Ctrl+Shift+L

Command+Shift+L

expandtoline

Expand to matching

Ctrl+Shift+M

Ctrl+Shift+M

expandToMatching

Find

Ctrl+F

Command+F

find

Find all

Ctrl+Alt+K

Ctrl+Alt+G

findAll

Find next

Ctrl+K

Command+G

findnext

Find previous

Ctrl+Shift+K

Command+Shift+G

findprevious

Fold

Alt-L OR Ctrl-F1

Command-Alt-L OR Command-F1

fold

Fold all

Command+K OR Command+0

Ctrl+Command+Option+0

foldall

Fold all comments

Ctrl+Command+Option+0

foldAllComments

Fold other

Alt+0

Command+Option+0

foldOther

Go line down

Down OR Ctrl+N

Down OR Ctrl+N

golinedown

Go line up

Up OR Ctrl+P

Up OR Ctrl+P

golineup

Go to end

Ctrl+End

Command+End OR Command+Down

gotoend

Go to left

Left OR Ctrl+B

Left OR Ctrl+B

gotoleft

Go to line end

Alt+Right OR End

Command+Right OR End OR Ctrl+E

gotolineend

Go to line start

Alt+Left OR Home

Command+Left OR Home OR Ctrl+A

gotolinestart

Go to line…​

Ctrl+L

Command+L

gotoline

Go to next error

Alt+E

F4

goToNextError

Go to page down

Page Down OR Ctrl+V

Page Down OR Ctrl+V

gotopagedown

Go to previous error

Alt+Shift+E

Shift+F4

goToPreviousError

Go to right

Right OR Ctrl+F

Right OR Ctrl+F

gotoright

Go to start

Ctrl+Home

Command+Home OR Command+Up

gotostart

Go to word left

Ctrl+Left

Option+Left

gotowordleft

Go to word right

Ctrl+Right

Option+Right

gotowordright

Italic selection

Ctrl+I OR Ctrl+İ OR Ctrl+I OR Ctrl+I

Command+I OR Command+İ OR Command+I OR Command+I

italicize-selected

Jump to matching

Ctrl+] OR kbd:[Ctrl+P

kbd:[Command+\]

jumptomatching

Modify number down

Ctrl+Shift+Down

Alt+Shift+Down

modifyNumberDown

Modify number up

Ctrl+Shift+Up

Alt+Shift+Up

modifyNumberUp

Move lines down

Alt+Down

Option+Down

movelinesdown

Move lines up

Alt+Up

Option+Up

movelinesup

Open Link

Ctrl+F3

F3

openlink

Open command palette

F1

F1

openCommandPallete

Outdent

Shift+Tab

Shift+Tab

outdent

Page down

Ctrl+Page Down

Option+Page Down

pagedown

Page up

Ctrl+Page Up

Option+Page Up

pageup

Pastes from clipboard to AsciidocFX editor

Ctrl+Shift+V

Command+Shift+V

pasteX

Redo

Ctrl+Shift+Z OR Ctrl+Y

Command+Shift+Z OR Command+Y

redo

Remove line

Ctrl+D

Command+D

removeline

Remove to line end

Alt+Delete

Ctrl+K OR Command+Delete

removetolineend

Remove to line start

Alt+Backspace

Command+Backspace

removetolinestart

Remove word left

Ctrl+Backspace

Alt+Backspace OR Ctrl+Alt+Backspace

removewordleft

Remove word right

Ctrl+Delete

Alt+Delete

removewordright

Replace

Ctrl+H

Command+Option+F

replace

Replay macro

Ctrl+Shift+E

Command+Shift+E

replaymacro

Select all

Ctrl+A

Command+A

selectall

Select down

Shift+Down OR Ctrl+Shift+N

Shift+Down OR Ctrl+Shift+N

selectdown

Select left

Shift+Left OR Ctrl+Shift+B

Shift+Left OR Ctrl+Shift+B

selectleft

Select more after

Ctrl+Alt+Right

Ctrl+Alt+Right

selectMoreAfter

Select more before

Ctrl+Alt+Left

Ctrl+Alt+Left

selectMoreBefore

Select next after

Ctrl+Alt+Shift+Right

Ctrl+Alt+Shift+Right

selectNextAfter

Select next before

Ctrl+Alt+Shift+Left

Ctrl+Alt+Shift+Left

selectNextBefore

Select or find next

Alt+K

Ctrl+G

selectOrFindNext

Select or find previous

Alt+Shift+K

Ctrl+Shift+G

selectOrFindPrevious

Select right

Shift+Right

Shift+Right

selectright

Select to end

Ctrl+Shift+End

Command+Shift+End OR Command+Shift+Down

selecttoend

Select to line end

Alt+Shift+Right

Command+Shift+Right OR Shift+End OR Ctrl+Shift+E

selecttolineend

Select to line start

Alt+Shift+Left

Command+Shift+Left OR Ctrl+Shift+A

selecttolinestart

Select to matching

Ctrl+Shift+] OR kbd:[Ctrl+Shift+P

kbd:[Command+Shift+\]

selecttomatching

Select to start

Ctrl+Shift+Home

Command+Shift+Home OR Command+Shift+Up

selecttostart

Select up

Shift+Up OR Ctrl+Shift+P

Shift+Up OR Ctrl+Shift+P

selectup

Select word left

Ctrl+Shift+Left

Option+Shift+Left

selectwordleft

Select word right

Ctrl+Shift+Right

Option+Shift+Right

selectwordright

Show Firebug Console

F12

F12

firebug-lite

Show line numbers

Ctrl+L

Command+L

line-numbers

Show settings menu

Ctrl+,

Command+,

showSettingsMenu

Sort lines

Ctrl+Alt+S

Command+Alt+S

sortlines

Split into lines

Alt+Shift+I

Alt+Shift+I

splitSelectionIntoLines

Split line

Ctrl+O

splitline

Split selection into lines

Ctrl+Alt+L

Ctrl+Alt+L

toggleSplitSelectionIntoLines

Tab and Text snippets

Tab

Tab

indent

To lowercase

Ctrl+Shift+U

Ctrl+Shift+U

tolowercase

To uppercase

Ctrl+U

Ctrl+U

touppercase

Toggle block comment

Ctrl+Shift+/

Command+Shift+/

toggleBlockComment

Toggle comment

Ctrl+/

Command+/

togglecomment

Toggle fold widget

F2

F2

toggleFoldWidget

Toggle parent fold widget

Alt+F2

Alt+F2

toggleParentFoldWidget

Toggle recording

Ctrl+Alt+E

Command+Option+E

togglerecording

Transpose letters

Alt+Shift+X

Ctrl+T

transposeletters

Underline selection

Ctrl+U

Command+U

underline-selected

Undo

Ctrl+Z

Command+Z

undo

Unfold

Alt-Shift-L OR Ctrl-Shift-F1

Command-Alt-Shift-L OR Command-Shift-F1

unfold

Unfold all

Alt+Shift+0

Command+Option+Shift+0

unfoldall

Known Issues

PDF output shows all text as ####

On Linux platforms you can face with this issue. For the getting around for the issue you need to install Microsoft Core Fonts to your platform. How to install [microsoft-core-fonts]

Mac QWERTY Keyboard Bug

There is a bug in JavaFX which makes all keyboards on a Mac behave as "QWERTY". This means, that on a German "QWERTZ" layout the shortcuts for undo and redo are swapped.

Text Artifacts (Rainbowing) on Text

If you are being distracted by rainbow text artifacts on text, you can work around the issue by passing some VM options in [Install_Dir]/AsciidocFX.vmoptions, as shared in this RichTextFX bug.

  1. Open AsciidocFX.vmoptions.

  2. Add -Dprism.text=t2k and -Dprism.lcdtext=false to the file.

  3. Save and close.

  4. Launch AsciidocFX

Changelog

To see what has changed in recent versions of AsciidocFX, see the CHANGELOG

Support

Support AsciidocFX with pull requests or open an issue for bug & feature requests. You can make discussions in mail group or in the chat room at Gitter.im.

Contributors

Thank you to all the people who have already contributed to AsciidocFX! Contributors

Backers

Thank you to all our backers! [Become a backer]

Backers on Open Collective

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

asciidocfx's People

Contributors

angolini avatar ayowel avatar benignbala avatar dacog avatar gastaldi avatar gillesb avatar hernad avatar lefou avatar manthanrtilva avatar mojavelinux avatar nowheresly avatar oliver-loeffler avatar ozlerhakan avatar pilhuhn avatar rahmanusta avatar sbaechler avatar sengopal avatar skybber avatar suboptimal avatar torstenwalter avatar vanillajonathan avatar wfouche avatar xdamman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asciidocfx's Issues

Down-key not always working

When moving down to the next line, the cursor moves one character to the left as well.

When the next line is shorter than current cursor position, the down key moves the cursor to the end of the current line (instead of to the next line).

When the cursor is at the end of a line, the down-key does not move the cursor to the next line.

Observing all of this on Windows7

Support for custom paths for embedded images

Using the Maven Plugin I have configured the imagesdir property and omitted this image root directory in my document's image-tags.

I won't ask you to parse a pom.xml or such but maybe you have an idea on where to put properties like this for a certain project or how to support this use case, otherwise.

Thanks for a great editor for a great markup language!

Polish letters can not be inserted into editor

AsciiDoc editor probably captures some key strokes internally, so effectively some characters can not be inserted into editor (they don't appear on screen). In my case it applies to some specific Polish letters:
ą - RightAlt + a
ę - RightAlt + e
ś - RightAlt + s
ł - RightAlt + l

It's quite critical issue as it disallows to write comfortably common texts in Polish language.

Community Group

Create a group for the community to discuss new ideas etc before creating issue/features.

Like
asciidocfx-dev - for core developers/contributors
asciidocfx-users - for end user related discussions.

Project support for JBake

JBake is "Jekyll of the JVM" it also supports Asciidoc files support. If we can some how create project structure through AsciidocFX than many it help people to create static website throught the application.

If internally generate the website and who the full website in the preview.

(this issue may be out of scope but still we can make it a "help wanted" tag)

Can't Generate PDF with windows restricted filename characters in title

AsciidocFX silently fails to generate a PDF document on windows if I have the colon : character in the title of the document. Windows does not allow the : character in file names, so a substitution or error message would be expected. Log file has the following stack trace.

123361 [XNIO-2 I/O-3] ERROR org.xnio.listener - XNIO001007: A channel event listener threw an exception
java.util.concurrent.RejectedExecutionException: XNIO007007: Thread is terminating
    at org.xnio.nio.WorkerThread.execute(WorkerThread.java:568) [AsciidocFX-1.3.2.jar:na]
    at io.undertow.websockets.jsr.UndertowSession$2.handleEvent(UndertowSession.java:111) ~[AsciidocFX-1.3.2.jar:na]
    at io.undertow.websockets.jsr.UndertowSession$2.handleEvent(UndertowSession.java:103) ~[AsciidocFX-1.3.2.jar:na]
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[AsciidocFX-1.3.2.jar:na]
    at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:842) ~[AsciidocFX-1.3.2.jar:na]
    at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:776) ~[AsciidocFX-1.3.2.jar:na]
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) ~[AsciidocFX-1.3.2.jar:na]
    at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.terminated(WriteReadyHandler.java:70) ~[AsciidocFX-1.3.2.jar:na]
    at org.xnio.nio.NioSocketConduit.writeTerminated(NioSocketConduit.java:197) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.nio.NioSocketConduit.terminateWrites(NioSocketConduit.java:186) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.nio.NioSocketConduit.truncateWrites(NioSocketConduit.java:191) [AsciidocFX-1.3.2.jar:na]
    at io.undertow.conduits.IdleTimeoutConduit.truncateWrites(IdleTimeoutConduit.java:306) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.conduits.ConduitStreamSinkChannel.close(ConduitStreamSinkChannel.java:186) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.IoUtils.safeClose(IoUtils.java:134) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.conduits.WriteReadyHandler$ChannelListenerHandler.forceTermination(WriteReadyHandler.java:57) ~[AsciidocFX-1.3.2.jar:na]
    at org.xnio.nio.NioSocketConduit.forceTermination(NioSocketConduit.java:107) [AsciidocFX-1.3.2.jar:na]
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:490) [AsciidocFX-1.3.2.jar:na]
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: TypeError: 'undefined' is not a function (evaluating 'b.$rpartition(": ")')
    at com.sun.webkit.dom.JSObject.fwkMakeException(Unknown Source)
    at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
    at com.sun.webkit.WebPage.executeScript(Unknown Source)
    at javafx.scene.web.WebEngine.executeScript(Unknown Source)
    at com.kodcu.service.convert.RenderService.lambda$null$104(RenderService.java:92)
    at com.kodcu.service.convert.RenderService$$Lambda$498/1238677787.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$48/356029151.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$47/198305255.run(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$$Lambda$38/126214382.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Warning: Could not get charToByteConverterClass!
Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: TypeError: 'undefined' is not a function (evaluating 'b.$rpartition(": ")')
    at com.sun.webkit.dom.JSObject.fwkMakeException(Unknown Source)
    at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
    at com.sun.webkit.WebPage.executeScript(Unknown Source)
    at javafx.scene.web.WebEngine.executeScript(Unknown Source)
    at com.kodcu.service.convert.RenderService.lambda$null$104(RenderService.java:92)
    at com.kodcu.service.convert.RenderService$$Lambda$498/1238677787.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$48/356029151.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
    at com.sun.javafx.application.PlatformImpl$$Lambda$47/198305255.run(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
    at com.sun.glass.ui.win.WinApplication$$Lambda$38/126214382.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Improvements for File > Open dialogue

I really like this editor, so I hope you're planning to extend and improve it. I'd like it to be easier to open a file.
Currently the File > Open dialogue opens the root of my Windows PC. And then I have to navigate to my project directory. The experience would be greatly improved with:

  1. Remember the last directory that was opened. Open this directory on the next File > Open action.
  2. Have a Most-Recently-Used list in the File menu, so that you can quickly re-open a file. Similar to Notepad++.

Ability to change html id anchor?

You seem to have a buildin server (http://localhost:44299) that renders the asciidoc as html. This is very cool. However I am using github wiki infrastructure to maintain documentation and that generates anchors for sections by replacing whitespaces with a hypen while you seem to use an underscore and also add one underscore as prefix. Therefore my page-internal links are not working in your preview.

I am aware that there is no standard for this but as github (gollum) is quite a prominent case for asciidoc rendering it would be awesome if asciidocfx could be configured to render the anchor ids in a compatible way (using hypen instead of underscore and without a prefix).

Mac binaries in Linux archive

It seems like the release archives for Linux contain Mac binaries.

$ file jre/Contents/Home/jre/bin/java
jre/Contents/Home/jre/bin/java: Mach-O 64-bit x86_64 executable

Something wrong with the build?

Prompt to save changes on exit

I've lost work several times by forgetting to save before exiting. It would be nice if AsciidocFX prompted to save unsaved work or at least warn when there are unsaved work before exiting.

create "real" MacOS Application

Currently I have to start AsciidocFX from the command line...
fine for me, but if you want to increase your userbase, a "real" app
would be nicer, imho.

You could use the following maven plugin:
http://mojo.codehaus.org/osxappbundle-maven-plugin/

Or have a look at the Griffon-framework, they can create multiple different
target formats (windows, mac, linux) via Gradle plugins...

(thx and sorry, currently I'm too busy to contribute on my own )

AsciidocFX Github Org

Look like AsciidocFX having more use-case and making it more support into it.

A suggestion to move from a individual repo to a Organisation in Github.

Cannot open files

Neither double clicking nor selecting "Open" from the context menu of the file browser (left tree viewer) opens the file in the editor area.

Current master branch.

JSException: SyntaxError: Expected token ')'

  • Version of AsciidocFX: 1.0.3
  • Operating System: Windows 7
  • Java Version: java version "1.8.0_11"
    Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
  • Error message (in console):
    Exception in thread "JavaFX Application Thread" netscape.javascript.JSException: SyntaxError: Expected token ')'
    at com.sun.webkit.dom.JSObject.fwkMakeException(JSObject.java:128)
    at com.sun.webkit.WebPage.twkExecuteScript(Native Method)
    at com.sun.webkit.WebPage.executeScript(WebPage.java:1410)
    at javafx.scene.web.WebEngine.executeScript(WebEngine.java:934)
    at com.kodcu.controller.AsciiDocController.lambda$addTab$19(AsciiDocController.java:418)
    at com.kodcu.controller.AsciiDocController$$Lambda$20/2139528007.changed(Unknown Source)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:176)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
    at javafx.beans.property.ReadOnlyObjectWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyObjectWrapper.
    java:176)
    at javafx.beans.property.ReadOnlyObjectWrapper.fireValueChangedEvent(ReadOnlyObjectWrapper.java:142)
    at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
    at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:145)
    at javafx.scene.web.WebEngine$LoadWorker.updateState(WebEngine.java:1214)
    at javafx.scene.web.WebEngine$LoadWorker.dispatchLoadEvent(WebEngine.java:1325)
    at javafx.scene.web.WebEngine$LoadWorker.access$1100(WebEngine.java:1207)
    at javafx.scene.web.WebEngine$PageLoadListener.dispatchLoadEvent(WebEngine.java:1194)
    at com.sun.webkit.WebPage.fireLoadEvent(WebPage.java:2373)
    at com.sun.webkit.WebPage.fwkFireLoadEvent(WebPage.java:2217)
    at com.sun.webkit.network.URLLoader.twkDidReceiveResponse(Native Method)
    at com.sun.webkit.network.URLLoader.notifyDidReceiveResponse(URLLoader.java:754)
    at com.sun.webkit.network.URLLoader.access$1000(URLLoader.java:43)
    at com.sun.webkit.network.URLLoader$4.run(URLLoader.java:718)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
    at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
    at java.lang.Thread.run(Thread.java:745)
  • consistently reproducible
  • steps to reproduce:
    (1) Download the official AsciiDoc User Guide ( http://www.methods.co.nz/asciidoc/asciidoc.txt ).
    (2) Attempt to open the official AsciiDoc User Guide using AsciidocFX, version 1.0.3
    (3) File does not open and error message appears as above.

Allow passing the JAVA_HOME location as an argument

I use java 7 and don't want to use Java 8 system wide for a while. I did the following to asciidocfx.sh to pass the java in the command line:

 # resolve links - $0 may be a softlink
 PRG="$0"
+GIVEN_JAVA="$1"
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin ; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
 fi

+if [ ! -z "$GIVEN_JAVA" ] ; then
+  JAVA_HOME="$GIVEN_JAVA"
+fi
+
 # If a specific java binary isn't specified search for the standard 'java' binary
 if [ -z "$JAVACMD" ] ; then
   if [ -n "$JAVA_HOME"  ] ; then
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
       # IBM's JDK on AIX uses strange locations for the executables
       JAVACMD="$JAVA_HOME/jre/sh/java"
     else
       JAVACMD="$JAVA_HOME/bin/java"
     fi
   else
     JAVACMD=`which java`
   fi
 fi

Then I ran it using: ./asciidocfx.sh ~/opt/jdk1.8.0_20/

WDYT?

Allow serving up *.mp4 files

Including a video ie video::myvid.mp4[] fails. I believe the Spring MVC needs to be updated.

Ideally I'd like to put videos in a subdirectory as well.

Code snippet tool

Like table generator we can have code snippet/palette tool (may be) under the folder list.

This will list many code snippet generator to help newbie to easy insert Asciidoc code

Mark selection on right column within asciidoc document

Thanks for your smooth and nicely usable editor. This is a feature request for improving usability:

I would be nice to easily find the position of some text read in the right column within the asciidoc code. I could imagine to select some text in the right column or simply click at a line and on the left column I would get the text or line highlighting, which contains the asciidoc of the current selection in the final document.

Would that be possible?

Filter treeview with list only asciidoc files.

In the left side column treeview it display all files and folders.
Though AsciidocFX supports only asciidoc files its good to filter only asciidoc extension files.

This will reduce the big list of unwanted files.

The following test.adoc produces an error

Here an example to generate an error when producing docbook .xml or .pdf output:

= Book Title
:Author: xxx yyy
:Email: <[email protected]>
:doctype: book
:numbered:
:toc: left
:toclevels: 3
:toc-title: Contents
:sectanchors:
:icons: font
:linkcss:
:experimental:
:source-language: shell
:leveloffset: 0

== Foo

* This
* Example
* would `/xxx/${XXX}/.xxx.*`
* work.

* This Example does `/xxx/${XXX}/.xxx.*` not `/xxx/${XXX}/.xxx.*` work!

As it seems the two stars in one line do trigger the problem.

The following xml code gets generated during docbook generation:

<listitem>
<simpara>This Example does <literal>/xxx/${XXX}/.xxx.<emphasis role="strong"></literal> not <literal>/xxx/${XXX}/.xxx.</emphasis></literal> work!</simpara>
</listitem>
</itemizedlist>

The <emphasis role="strong"> part generates the error.

JNLP Launch

Other than Zip bin support we can have a JNLP link in the website so anyone who like to install can do on-line. No need to configure the zip file or build from core.

Bold monospace does not render.

I tried:

This is normal text. +This is monospace. *This is bold monospace.*+

Expected result: the described results.
Actual result: All normal text, with literal asterisks around the final sentence.

The reference 'asciidoc' renderer supports this syntax.

Add tooltips to toolbar buttons

Currently, the buttons in the toolbar of the editor windows have no tooltips. This makes it rather hard to guess what to expect from a click. At least not all icons are self-explanatory.

Word Counter.

Yazılımın alt tarafına kelime sayısı ve karakter sayısı paneli gelirse çok daha faydalı olacaktır. Örnek olarak bu sitedeki sağ paneli verebiliriz. http://www.wordcounter.net/ Tabi bu yazılımda Word gibi altta ufacık yazması yeterlidir.

Support +Monospaced text+

AsciiDoc declares the ability to declare monospaced text. The current GitHub wiki, I am editing contains a log of such entires like +text+.
Currently AsciidocFX will product –0— for each monospaced text entry.

Windows installer does not remove old files

Downloaded the windows.exe, version 1.3.6
Invoking the .exe file from the start menu leads to a process starting and just sitting there. No screen visible, no CPU usage.
Invoked bin/asciidocfx.bat from the command prompt. This results in the following:

C:\Program Files\AsciidocFX\bin>asciidocfx.bat
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.ClassCastException: org.apache.tomcat.websocket.WsWebSocketContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:124)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
        at com.kodcu.boot.AppStarter.startApp(AppStarter.java:47)
        at com.kodcu.boot.AppStarter.start(AppStarter.java:35)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(Unknown Source)
        at com.sun.javafx.application.LauncherImpl$$Lambda$51/29950902.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(Unknown Source)
        at com.sun.javafx.application.PlatformImpl$$Lambda$45/28230490.run(Unknown Source)
        at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
        at com.sun.javafx.application.PlatformImpl$$Lambda$47/5712435.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
        at com.sun.javafx.application.PlatformImpl$$Lambda$46/1115142.run(Unknown Source)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
        at com.sun.glass.ui.win.WinApplication$$Lambda$37/7135120.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.apache.tomcat.websocket.WsWebSocketContainer cannot be cast to io.undertow.websockets.jsr.ServerWebSocketContainer
        at io.undertow.websockets.jsr.Bootstrap.handleDeployment(Bootstrap.java:62)
        at io.undertow.servlet.core.DeploymentManagerImpl.handleExtensions(DeploymentManagerImpl.java:243)
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:149)
        at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory.createDeploymentManager(UndertowEmbeddedServletContainerFactory.java:345)
        at org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory.getEmbeddedServletContainer(UndertowEmbeddedServletContainerFactory.java:201)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:148)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:121)
        ... 22 more

Bootstrap script fails: "Could not find or load main class com.kodcu.boot.AppStarter"

Hi there,

Just downloaded v1.0.10 zip.

bin/asciidocfx.sh fails with main class not found error:

➜ asciidocfx: bin/asciidocfx.sh 
Error: Could not find or load main class com.kodcu.boot.AppStarter

Here's the command line that exec statement trying to execute

/usr/lib/jvm/default/bin/java -classpath /tmp/asciidocfx/conf:/tmp/asciidocfx/lib/* -Dapp.name=asciidocfx -Dapp.pid=32707 -Dapp.repo=/tmp/asciidocfx/lib -Dapp.home=/tmp/asciidocfx -Dbasedir=/tmp/asciidocfx com.kodcu.boot.AppStarter

I suspect an incompatibility with OpenJDK / OpenJFX but the error message is very unlikely.

FYI: I'm using OpenJDK 8b20

Keep up the good work

Saygılar

Support/enforce fixed-width fonts in edit pane

Currently, the left-hand edit pane uses a non-fixed-width font (at least on my OS, Kubuntu 14.04).

This is a problem, since in Asciidoc the number of character repetitions for sections/preamble separators is significant wrt. the section/preamble title length. It's especially confusing for Asciidoc beginners (such as myself).

Hence, it would be nice if AsciidocFX would attempt to enforce a fixed-width (ie. monospace) font for its edit pane.

Can asciidocfx obey GNOME3 styles?

AsciiDocFX master builds fine for me and I can do an installation from the created zip. However the application runs black on white, which is no good for me, I need light on dark. Is there a way of getting the application to obey the GNOME3 global dark theme, or perhaps have a light on dark style as IntelliJ IDEA, NetBeans, PyCharm, and Android Studio do?

Undo not working on Mac

Following up on a chat on Gitter.

When I press CMD-Z or CTRL-Z nothing happens. I expect the editor to undo the last action.

I'm using version 1.3.4 on a Mac, Yosemite. My Java version is 8 Update 25.

Exception when invoking from Windows Explorer

Associate AsciidocFX with .adoc files in Windows explorer.
Double-click on a file. This results in notification window. The window title is:

com/Kodcu/Start

The error message is:
Failed due to exception from main class.

Would be nice to have this fixed so that files can be opened from Windows Explorer instead of having to open them from the File>Open menu.

Position tracking should depend on cursors position

I currently observe some inconsistent behavior when scrolling through the ascii document vs. selecting text in the document.

First, will result in a nearly equivalent scrolling on the pre-processed document side, which is good.
Second, will result in scrolling the pre-processed document to the paragraph of the selected text. Nevertheless, it will not be scrolled equivalently to the position of the cursor in the asciidoc, but while the text selection or the cursor might be in the middle of the left editor, the interesting text paragraph of the pre-processed document will be scrolled to the top of the right view.

Thus the documents are not in sync at the text positions. Alternating scrolling and selecting text, will result in an non-easily traceable view of the pre-processed document :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.