The reader is mainly used for draft mode editing or simple content display. It needs real-time collaborative display and is set to be non-editable. You can use the engine's readonly attribute
Passed in when instantiating the reader
import {View} from'@aomao/engine';//Instantiate the viewconst view = new View(render node, {... configuration items,});
string
zh-CN
zh-CN
, en-US
. Can use locale
configurationconst view = new View(render node, {lang:'zh-CN',});
object
zh-CN
Language pack, default language pack [https://github.com/big-camel/am-editor/blob/master/locale](https://github.com/big-camel/am-editor/tree/master/ locale)
const view = new View(render node, {locale: {'zh-CN': {test:'Test',a: {b: "B"}},}});console.log(view.language.get<string>('test'));
Node
Array<Plugin>
[]
Plugin
Array<Card>
[]
Card
abstract class{ [key: string]: PluginOptions }
{}
Node | (() => Node | null)
overflow
or overflow-y
is auto
or scroll
, if not, take document.documentElement
scroll
event to set the floating position of the bomb layer and actively set the scroll to the editor target positionboolena
true