aboutsummaryrefslogtreecommitdiff
path: root/editor/editor.d.ts
AgeCommit message (Collapse)Author
2023-10-24all: fix all linter warnings from tsc and eslintShulhan
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
2021-10-20editor: export the ClearSelection methodShulhan
The ClearSelection method clear the selection indicator on user interface.
2021-08-29editor: make the lines field become publicShulhan
2021-08-29editor: simplify the Open methodShulhan
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.
2021-08-28editor: listen on key Escape on document to clear selectionShulhan
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.
2021-08-28all: use the WuiResponseInterface for non-void return typeShulhan
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.
2021-08-28all: refactoring to follow the coding style in READMEShulhan
* 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".
2021-08-27editor: add handler to save the contentShulhan
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
2021-08-23editor: remove the SaveFile field from EditorShulhan
2021-08-22editor: add method GetContentShulhan
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).
2021-08-15editor: add method to get file and selection rangeShulhan
The GetFile method return the current file as IVfsNode, including its content (concatenated). The GetSelectionRange return the current selection on the editor.
2021-08-12editor: add event handler for OnSelectionShulhan
The OnSelection event will be triggered when user select one or more lines.
2021-07-31editor: pressing escape key will clear the selectionShulhan
2021-07-31editor: implement redo functionality using CTRL+rShulhan
2021-07-29editor: handle undo with CTRL+ZShulhan
2021-07-27editor: fix enter and support for backspaceShulhan
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.
2021-07-26editor: init the style sheet using javascript and add support for tabShulhan
2021-07-26editor: add support to move arrow up and down between textShulhan
2021-07-26all: implement editorShulhan