| Age | Commit message (Collapse) | Author |
|
Previously pressing tab on editor will move focus to the next
component on page or browser.
Now, pressing tab will insert "\t" on the current cursor.
|
|
Since we cannot change its shape, changing the color to red make the
text cursor position visible to eyes.
|
|
Sometimes we got an issue where pressing enter may cause the editor
being saved without pressing Control key.
|
|
The gap make us confuse between space and padding.
|
|
|
|
|
|
The execCommand has been deprecated according to Mozilla Developer
Network.
This changes require the tsc target set to es2019 to be able to
use the string trimEnd method.
[1]: https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand
|
|
|
|
Using CTRL+s sometimes cause pressing s only trigger the save.
|
|
This is to make the content that we save and the content on editor
is always same.
|
|
On each paste event, re-render the line number in case the clipboard
contains new lines.
|
|
Using multiple lines of content editable is hard, especially when
involving selection, deletion, and managing undo-redo history.
|
|
Previously, mouse selection only works on single line.
This changes, make mouse selection works on multiple lines, also when
user press CTRL+C we reformat the copied data to add line-feed so we
can split later during paste.
|
|
If user select text and press delete key, the selected text should be
deleted.
|
|
Instead of binding key up and down on each line for handling, bind it to
document.
|
|
In this changes we introduce eslint as our linter for TypeScript and
update our tsconfig to be more strict.
The ".eslintrc.yaml" and "tsconfig.json" is taken from golang/website
repository [1].
[1]: https://cs.opensource.google/go/x/website
|
|
I cannot remember how I reformat those files previously, probably without
any tools.
This changes reformat the TypeScript files using prettier and HTML files
using js-beautify.
|
|
See https://kilabit.info/journal/2022/gpl/ for more information.
|
|
When delete key pressed on line, it will delete single character or
join the current line with the next line.
|
|
The ClearSelection method clear the selection indicator on user
interface.
|
|
|
|
|
|
|
|
|
|
Previously, the Open method call the predefined options OpenFile,
which in turn may send request to remote server.
This changes simplify it by accepting node interface that has been
filled with content and metadata.
|
|
Previously, to clear selection, user must set the editor to active
by selecting any line.
This commit allow user to clear selection by pressing "Escape" anywhere
on the document.
While at it, add methods to turn on or off the editor editability.
|
|
This commit changes the WuiVfsOptions.istNodes and
WuiEditorOptions.OpenFile to WuiResponseInterface.
WuiResponseInterface define an interface that will be returned by function
or method with non-void type.
If the function/method success, the code should be set to 200 (equal to
HTTP OK), and the data will contains the expected data for that function.
If the function/method call failed, the code should be set to other value
beside 200 with a message describe why its failed.
|
|
* Use snake_case for field, variable, HTML ID, and CSS class names.
* Use camelCase for class, interface, type, function, or method names.
* An exported type or class. interface, type, method, or function name
MUST start with an upper-case letter.
* An exported class, type, interface, or function MUST be prefixed with
"Wui".
|
|
When user press CTRL+S on the editor, it will trigger the OnSave handler.
While at it,
* auto scroll when pressing arrow up or down
* auto scroll to bottom when pressing Enter at the end of file
* fix tab key not inserting tab characters
|
|
|
|
The GetContent method return the concatenated statements with new-line.
While at it, set default range begin and end to -1 to fix issue where
user select only line number 1 (index 0).
|
|
The GetFile method return the current file as IVfsNode, including its
content (concatenated).
The GetSelectionRange return the current selection on the editor.
|
|
The OnSelection event will be triggered when user select one or more
lines.
|
|
|
|
|
|
|
|
|
|
Previously copy or cutting text on line and pasting it will generate
<span> inside the line.
This commit fix the paste function to paste only text.
|
|
Enter on middle of line now will cut the text and move the rest text
after caret to the next line.
Pressing backspace on the beginning of line will merge the line with
previous one.
|
|
|
|
|
|
|