this repo has no description
1open Code_mirror
2open Brr
3
4let basic_setup = Jv.get Jv.global "__CM__basic_setup" |> Extension.of_jv
5
6let init ?doc ?(exts = [||]) () =
7 let open Editor in
8 let config =
9 State.Config.create ?doc
10 ~extensions:(Array.concat [ [| basic_setup |]; exts ])
11 ()
12 in
13 let state = State.create ~config () in
14 let opts = View.opts ~state ~parent:(Document.body G.document) () in
15 let view : View.t = View.create ~opts () in
16 (state, view)
17
18let _editor = init ~exts:[||] ()