Module PreviewerSource

Sourcetype previewer

A previewer is meant for "live previewing without flickering".

To create a previewer, you need to provide an HTML element that contains exactly:

When you have a previewer, you can preview a source. For the moment, it has to be a source: you cannot pass it a compiled file.

Sourceval create_previewer : ?initial_stage:int -> ?callback:(int -> unit) -> ?save_drawing:(path:string -> content:string -> unit) -> save_coordinate: (id:Common_types.gui_id -> coord:Actions_arguments.Gui.t -> unit) -> goto_loc:(Common_types.gui_id -> unit) -> include_speaker_view:bool -> errors_el:Brr.El.t -> steal_focus:bool -> can_save:bool -> can_gui:bool -> Brr.El.t -> previewer
Sourceval preview : ?options:Slipshow.Frontmatter.Global.t -> ?slipshow_js:Slipshow.Uri.t -> previewer -> string -> unit
Sourceval preview_compiled : previewer -> (Slipshow.delayed * string) -> unit
Sourceval ids : previewer -> string * string
Sourceval next : previewer -> unit
Sourceval previous : previewer -> unit
Sourceval activate_gui : previewer -> Common_types.gui_id -> unit
Sourceval deactivate_gui : previewer -> unit
Sourceval notify : previewer -> string -> unit