Renamed to lerzegov/elm-markup-fork. It is published under that name, and new versions come out there.
Versions published as lerzegov/elm-markup still install under that name. 1 version could not be recovered and cannot be installed.
Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: no fork with tag 1.0.0 found (28 same-name repos checked); https://github.com/lerzegov/elm-markup-fork has tag 1.0.0, but not a package Elm could build from it; https://github.com/lerzegov/elm-markup-fork commit 1ea589d5d7f182e39d0a124ab1561a7e076e4f31 (the tag's commit when Software Heritage visited) has tag 1.0.0, but not a package Elm could build from it; no cached copy. Use another version.
Create a new Mark.Block that can be added to your document using Mark.Edit.replace or Mark.Edit.insertAt.
Let's say we are capturing a basic diagram in our document and we want to dynamically insert a circle.
We can make a new circle by writing the following function
import Mark.New as New
type alias Circle =
{ x : Int
, y : Int
, label : String
}
circle : Circle -> Mark.New.Block
circle details =
New.record "Circle"
[ ( "label", New.string details.label )
, ( "x", New.int details.x )
, ( "y", New.int details.y )
]And then insert our newly made circle using Mark.Edit.insertAt.
Note: The document will only accept edits which are valid.
Here's an example of creating some text.
newText =
New.text
[ Mark.unstyled "Look at my "
, Mark.bold "cool"
, Mark.unstyled " new text!"
]New.annotation
{ name = "link"
, text =
[ New.unstyled "my link to the elm website!" ]
, fields =
[ ( "url", Mark.string "https://elm-lang.com" ) ]
}