This release is a fairly significant overhaul of the package, simplifying the Ember-specific bits and more directly exposing Ace itself.
- The minimum supported Ember version is 3.24
- This package is now a v2 addon, and consumers must be using Embroider or
ember-auto-import@2
. - The
ace-builds
package is now apeerDependency
that should be provided by the host. - Ace itself is no longer re-exported by
ember-ace
; any of its exports you were using should now be imported directly fromace-builds
. - The
{{ember-ace}}
component is now<AceEditor />
. - Rendering completion tooltips in-template is no longer supported (this never fully worked previously).
- Most args to the editor component have been dropped in favor of an
@options
object that will be passed directly through to Ace (see detailed migration guide below). - All previous build-time configuration is now managed via bundler imports (see detailed migration guide below).
Update any usage of {{ember-ace}}
or <EmberAce />
to <AceEditor />
.
The @value
, @update
and @ready
args continue to function as before. A new @options
argument has been added that is passed through directly to the editor, encompassing many args the component previously accepted.
Valid keys to include in @options
are any member of the Ace.EditorOptions
interface, which also includes Ace.EditSessionOptions
, Ace.MouseHandlerOptions
and Ace.VirtualRendererOptions
.
The following keys will continue to function as before, but should be passed as part of @options
rather than as top-level args:
mode
theme
useSoftTabs
tabSize
useWrapMode
(or justwrap
)highlightActiveLine
showPrintMargin
showInvisibles
readOnly
showLineNumbers
minLines
maxLines
enableLiveAutocompletion
The following keys are now defunct:
lines
: passminLines
andmaxLines
in@options
insteadeditorClass
: set a regularclass
attribute directly on the<AceEditor />
component insteadenableDefaultAutocompletion
: passenableBasicAutocompletion
in@options
insteadsuggestCompletions
: register a custom completer manuallyoverlays
: manually registermarkers
andannotations
using theAce.Editor
instance provided to the@ready
actionmarkers
: use@ready
andeditor.session.{addMarker,removeMarker}
to manage markers on the editorannotations
: use@ready
andeditor.session.setAnnotations
to manage annotations on the editor
Prior to version 3, including custom modes, themes, etc for your editor was managed via build-time config in your ember-cli-build.js
file.
Now, that process is handled by your bundler (typically Webpack, via ember-auto-import
or Embroider). For example, by adding the following somewhere in your project:
import 'ace-builds/src-noconflict/theme-ambiance';
You can then use the ambiance
theme for your editor:
See Configuring Ace in the README for further details and guidance for including background workers for some editor modes.
The enableDefaultAutocompletion
option now actually, well, works. See #29.
- Updated to the latest
ace-builds
release - Updated the page object in
addon-test-support
to use the newcollection
API (available in 1.14 and higher)
The main notable change with the newer Ace version is that autocomplete items returned from the suggestCompletions
action are subject to different sorting rules than in previous versions.
See the Ember CLI Page Object documentation for details on the changes to the collection
API, comparing the old API to the new one.