aboutsummaryrefslogtreecommitdiff
path: root/editor/editor.js
AgeCommit message (Collapse)Author
2024-10-03editor: allow inserting tab on editorShulhan
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.
2024-09-15all: commit all generate JavaScript filesShulhan
This is to simplify development on third party where they can clone and include the file directly without installing or running anything to build the files.
2021-08-29all: remove and ignore generate JavaScript filesShulhan
2021-08-29editor: make the lines field become publicShulhan
2021-08-29editor: always decode the node content from base64Shulhan
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-31all: add license file and headersShulhan
2021-07-29editor: handle undo with CTRL+ZShulhan
2021-07-27editor: fix paste to plain textShulhan
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.
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