davejarvis / keenwrite Goto Github PK
View Code? Open in Web Editor NEWFree, open-source, cross-platform desktop Markdown text editor with live preview, string interpolation, and math.
License: Other
Free, open-source, cross-platform desktop Markdown text editor with live preview, string interpolation, and math.
License: Other
The word (or words) enclosed by backticks breaks at a word boundary, if possible.
As attached.
Caution is needed so that long backtick sentences don't overflow.
Add spell checking that avoid spell checking of variable definitions.
Replicate
Expected Results
The preview pane scrolls in lock-step with the editor pane.
Actual Results
The preview pane does not scroll and must be scrolled independently.
Allow the user to search for text and replace said text with variable names. This is not a regular search and replace dialog, it is specifically meant to replace duplicated text with a variable definition.
Replicate
Expected Results
The preview pane scrollbar should scroll to the end.
Actual Results
The text the user is editing is not shown in the preview pane (falls below the image).
Additional Information
See:
flow.svg
.![](flow.svg)
.Image renders fine.
Error:
org.w3c.dom.DOMException: The current document is unable to create an element of the requested type (namespace: http://www.w3.org/2000/svg, name: flowRoot).
flow.svg
in a text editor (don't use Inkscape).version
attribute of the root svg
element from 1.1
to 1.2
.Enter
to update the preview panel.The SVG is rendered.
Requirements when opening a definition file:
Implement Ctrl+j
to join lines separated by a single space together, similar to the vi J command.
OR
Change the pegdown implementation so that single line breaks don't convert to HTML <br/>
tags (end a sentence with double space and a hard-return to get a <br/>
instead).
Move CRUD buttons from the bottom to the top of definition editor pane.
See: http://stackoverflow.com/a/10221981/59087
This should allow translation of document using YAML variables.
Replicate
Expected Results
The Preview pane updates with the content of the newly opened file.
Actual Results
The Preview pane remains empty.
Ctrl+Space
.Actual Results
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at com.scrivenvar.AbstractFileFactory.lookup(AbstractFileFactory.java:88)
at com.scrivenvar.AbstractFileFactory.lookup(AbstractFileFactory.java:63)
at com.scrivenvar.editors.VariableNameDecoratorFactory.newInstance(VariableNameDecoratorFactory.java:51)
at com.scrivenvar.editors.VariableNameInjector.getVariableDecorator(VariableNameInjector.java:815)
at com.scrivenvar.editors.VariableNameInjector.decorate(VariableNameInjector.java:340)
at com.scrivenvar.editors.VariableNameInjector.decorate(VariableNameInjector.java:326)
at com.scrivenvar.editors.VariableNameInjector.autocomplete(VariableNameInjector.java:311)
at org.fxmisc.wellbehaved.event.InputMap.lambda$consume$2(InputMap.java:256)
at java.base/java.util.Optional.map(Optional.java:258)
at org.fxmisc.wellbehaved.event.PatternActionMap.lambda$forEachEventType$1(InputMap.java:414)
at org.fxmisc.wellbehaved.event.InputHandlerMap.lambda$null$0(InputHandlerMap.java:22)
at org.fxmisc.wellbehaved.event.InputHandlerMap.lambda$null$0(InputHandlerMap.java:23)
at org.fxmisc.wellbehaved.event.InputHandlerMap.lambda$null$0(InputHandlerMap.java:23)
at org.fxmisc.wellbehaved.event.InputHandler.handle(InputHandler.java:50)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$KeyHandler.process(Scene.java:4098)
at javafx.scene.Scene.processKeyEvent(Scene.java:2157)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2625)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:248)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:412)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
at com.sun.glass.ui.View.handleKeyEvent(View.java:547)
at com.sun.glass.ui.View.notifyKey(View.java:971)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:832)
When the <span id='CARETPOSITION'>
is added to the HTML output, the preview pane for the HTML doesn't show the correct position in the document. There might have to be some positional adjustments or improved JavaScript to accurately scroll to the <span>
element (perhaps by checking to see if the item is visible within the view port).
Provide the ability to refactor variable names.
This must come after issue #77 whereby the variable names can be refactored for a particular project. That project would then define all the files that would be affected by changing variable names.
After variable names can be refactored (taking into consideration both mustache and R syntax), update the AltTreeCellFactory
to support drag-and-drop (D&D). Any D&D event can then trigger a refactor event.
Add the ability to see YAML variables.
Calling out to R from Java:
knitr
is brokenAnd:
And:
Allow the editor to reference its own name inside its properties file.
Replicate
Using Microsoft Windows:
Expected Results
The text is shown to be selected by highlighting.
Actual Results
The text is not highlighted, but it is selected.
Replicate
Home
to move the caret to the beginning of a line.Up
or Down
arrow to scroll through the document.Expected Results
The caret never stops.
Actual Results
Sometimes the caret gets stuck within a Markdown tag.
Work Around
Use the mouse to change the caret position.
Give some space beneath the end of the preview so you can scroll a bit past the last line.
Upon insererting YAML variables into the document:
r#x(YAML VAR)
or $YAML VAR$
) via processorSee:
Variables files should auto-associate with the file being edited.
Editing variables will require re-creating the definitions map used by the string replacement algorithm.
See MainWindow.java
, around line 426:
final Processor<String> vnp = new VariableProcessor( mp, getResolvedMap() );
That map must update on changes to the YAML variables.
Allow YAML variables to reference other variables, recursively.
Open links in preview by clicking.
In MainWindow.java
:
refreshSelectedTab
and into new methodAdditionally:
Ctrl+l
Opens insertion dialog with the current selection as the link's text.
No suggested link text.
If no selection, then the word at the caret should be used by default. If the hyperlink text is changed, then the word at the caret should not be removed, but the hyperlink inserted at the caret (i.e., the word will get split with the hyperlink).
Instead of alert dialogs, use status bar messages.
To account for scrolling with any source document, a unique text string (e.g., ${CARETPOSITION}
) must be inserted into the text at the caret position prior to rendering, subject to the following conditions:
${CARETPOSITION}
at the current caret text position.<![CDATA[${CARETPOSITION}]]>
inside the text node closest to the caret text position.The Caret Processor finds ${CARETPOSITION}
in the rendered HTML and inserts an empty span
element with caret
as its ID. The HTML preview pane is then scrolled so that the caret's span element is visible.
The variable definition editor goes into edit mode immediately.
Nothing happens.
Updating DefinitionPane
's addItem
method to use a naïve approach causes subsequent edit actions to be ignored:
private void addItem() {
final var value = createTreeItem();
getSelectedItem().getChildren().add( value );
expand( value );
select( value );
getTreeView().edit( value );
}
Provide ability to load and edit XML documents, associating a document (or directory?) with a stylesheet for transforming. Requires:
Use the lightest (smallest bytecode) and most responsive of the following libraries:
Provide a place to edit the initialization code for InlineRProcessor.init( Path )
.
Should auto-replace variables such as:
$application.current.directory$
with the path variable.$application.current.date$
with the current date (dd-MM-yyyy).$application.current.time$
with the current time (HH:mm:ss).getDefinitions()
(as per existing code).Menu item shows option to export preview pane contents in a few different formats.
No menu item exists, no such behaviour exists.
Add chained processing services, including:
From http://www.xmlblaster.org/XSL_performance.html :
Tips for how to write efficient XSLT:
,
for example to solve grouping problems.node-set()
extension function.Make the way the preview follows where the cursor is less janky. It jumps around a lot. Only moving if necessary and making it slide rather than snap to place would be nice.
Ctrl+End
to reposition the caret to the end of the document.Enter
to add a blank line.a
to add a letter.The preview pane shows the letter a
, relative to the caret's current position in the document.
The preview pane jumps to the document start.
Type another letter.
The editor exhibits this behaviour when typing quickly or roving about the document using the cursor keys. The underlying problem appears to have something to do with the timing of when the corresponding Flying Saucer box for the element containing the caret id
attribute is added to the document. When typing too quickly, sometimes Flying Saucer does not find the HTML document's caret id
attribute, despite the attribute being available.
See SharedContext
's getBoxById(String)
, addBoxId(String, Box)
, and reset()
methods as well as HTMLPreviewPane
's scrollTo( Point )
method.
F2
to edit the new variable.The field is saved.
Nothing happens.
This is a known bug with the JavaFX implementation:
Working around the issue is difficult; the maintainers mention there are no hacks that fully resolve all the issues. It is possible to use reflection to obtain a handle to the private TextField textField
member of TextFieldTreeCell
and observe the focus of that text field, but that incurs reflection. Using reflection limits future possibilities (such as ProGuard, other means of reducing byte code size, or possibly generating native binaries using GraalVM).
For the @
usage:
@
for a list of commonly used YAML variables.Enter
to select the currently selected item from the list..
to select the current level (e.g., @c.
displays the list of values under character; @c.pr.
will display the list under c.protagonist).Backspace
to move backward one level.Esc
to close the list without insertion.Also, use Ctrl+Space
to autocomplete YAML variable name.
Consider:
|# Markdown
The caret position should not affect the layout. Thus when the caret is at the beginning of a line, inject the ${CARETPOSITION}
before the first non-punctuation character:
|===
becomes ===|
|# Markdown
becomes # |Markdown
|> Markdown
becomes > |Markdown
XML: Insert inside the text node closest to the caret text position.
See issue #23 for details.
Replicate
.Rxml
files.Expected Results
The variable is inserted into the visible document.
Actual Results
The variable is inserted into all documents.
The image is about 50 pixels high.
The image is around 100 pixels high.
When inlined, this makes the paragraph large and chunky, rather than svelt and small.
Use a service instead of a PegDownProcessor so that source document (markdown) parsing can be pipelined through multiple processors. See MarkdownEditorPane::getPegDownProcessor()
.
Replicate
Exact steps are unknown at this time.
Expected Results
Preview pane should be kept in sync with editor panel while moving the caret.
Actual Results
Sometimes the preview pane stops updating its scroll position relative to the caret within the editor.
Work Around
Close the file and re-open it, the preview should follow the caret position.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.