port module ArrayBased.Ports exposing (..) import ArrayBased.Model exposing (..) import InputTable.Model exposing (..) import Json.Encode as Encode sendRowsJson : List (Row RowData) -> Cmd msg sendRowsJson rows = let rowValues = Encode.list (List.map getRowValue rows) in sendRows (Encode.encode 4 rowValues) getRowValue : Row RowData -> Encode.Value getRowValue row = Encode.object [ ( "id", Encode.string row.id ) , ( "checked", Encode.bool row.checked ) ] port sendRows : String -> Cmd msg port initTinyMce : Maybe String -> Cmd msg