mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2026-04-26 10:55:56 +03:00
[GH-ISSUE #289] Auto Detect Opened File in Ace Editor #209
Labels
No labels
Feature
Feature
Is It Really an Issue?
Need More Info
Request
Security
bug
duplicate
enhancement
enhancement
help wanted
invalid
pull-request
question
suggestion
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tinyfilemanager#209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @azuharu on GitHub (Jan 21, 2020).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/289
Hi there, I wonder if we can set automatically opened file in ace editor?
in my case, I open php files, but selected mode is Javascript
Thank you
@nk932714 commented on GitHub (Jun 4, 2020):
duplicate of #183
yes it would be awesome if it automatically detects file-type.
here I'm editing
.phpfile but it is showing as JavaScript.@nk932714 commented on GitHub (Jun 5, 2020):
@prasathmani
not sure what the problem is


after inspect i found that code is working fine.
but still ace editor is not switching automatically to php
@EV-soft commented on GitHub (Jun 5, 2020):
The problem is that the selector always displays "javascript" as the first choice.
It cannot reflect current choice. (It is part of the ACE system)
Incidentally, there is another problem by simply specifying file extension as document type. It only succeeds in: .php, .xml, .html, .text and a few others.
For example, it fails with: .htm, .txt .js and many others, since the system's defined document types must be specified.
For this to work, a file extension to document type must be converted.
Here is the list of document types:
And here is a link to all the .js modules that can be used.
https://github.com/ajaxorg/ace/tree/master/lib/ace/mode