I am testing ACE-Editor to display large text files from the server. Since it claims that it is able to handle up to 4 million files and highlighting the text in it, it makes a good candidate.
I am struggling to understand Acess Editor and Acer Editor. In my opinion, it is possible for Ace Editor to read from the file and display it.
I am using () to create a session and specify the document. From API documentation:
to create edit session (document | string text, text mode mode)
Documents: if text is a document, then associate EditSession with it Otherwise, a new document has been created with the initial text
Here's my code:
& lt; Script src = "../ src / ace.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var docSession = new ace.createEditSession ("../ files / myFile.log", "ace / mode / plain_text"); Var Editor = ace.edit ("Editor"); Editor.setSession (docSession); Editor.setTheme ("ace / theme / dawn"); & Lt; / Script & gt; Unfortunately, all on the page appear "../Files/myFile.log" I suppose that instead of reading this document, with that text Creating another file How to tell the contents of MyFile.log to display it properly?
Does not handle ACE files by any means, it's only an editor's front end component is.
Editing in editing is an example of an object in definition, no file. To load the file in one essence, you need to get its content from the server. Some things like AJAX calls
Comments
Post a Comment