Back to front pageView on Hacker News (opens in a new tab)Show HN: This website is valid JSON (opens in a new tab)webdatarender.com604 pointsby gpnt (on Hacker News)5 years agoComments (229) 60 threadsShow all commentsShowing thread 5 of 60[-]minikomi5 years ago3 replies#Wow, now we can write pages like { "content": [ ["html", {}, [["head", {}, []], ["body", {}, [["h1", { id: "main-header" }, [ "Welcome to my", ["span", { class: "red-text" }, ["PAGE"]]]], ["h2", { id: "sub-header" }, [ "It's so cool.", ["br", {}, nil], "Don't you think?"]]]]]]]};[-]gpnt5 years ago1 reply#This is actually the exact opposite of why I have created WDR. The JSON is supposed to be only pure data. All the markup should be inside the render.minikomi5 years ago#Don't worry mate, just mucking about.https://en.wikipedia.org/wiki/SXMLescherize5 years ago#We do basically this. [0][1][0] escherize.com/w/hiccup.space[1] escherize.com/w/cljsfiddlebhl5 years ago#This is pretty close to how ProseMirror, a rich-text editor, manages its content state.Example of a schema: https://github.com/ProseMirror/prosemirror-schema-basic/blob...Example of a document converted to JSON: https://tiptap.dev/export
Show HN: This website is valid JSON (opens in a new tab)webdatarender.com604 pointsby gpnt (on Hacker News)5 years ago
minikomi5 years ago3 replies#Wow, now we can write pages like { "content": [ ["html", {}, [["head", {}, []], ["body", {}, [["h1", { id: "main-header" }, [ "Welcome to my", ["span", { class: "red-text" }, ["PAGE"]]]], ["h2", { id: "sub-header" }, [ "It's so cool.", ["br", {}, nil], "Don't you think?"]]]]]]]};
gpnt5 years ago1 reply#This is actually the exact opposite of why I have created WDR. The JSON is supposed to be only pure data. All the markup should be inside the render.
escherize5 years ago#We do basically this. [0][1][0] escherize.com/w/hiccup.space[1] escherize.com/w/cljsfiddle
bhl5 years ago#This is pretty close to how ProseMirror, a rich-text editor, manages its content state.Example of a schema: https://github.com/ProseMirror/prosemirror-schema-basic/blob...Example of a document converted to JSON: https://tiptap.dev/export
Comments (229) 60 threads
Show all comments
Showing thread 5 of 60
https://en.wikipedia.org/wiki/SXML
[0] escherize.com/w/hiccup.space
[1] escherize.com/w/cljsfiddle
Example of a schema: https://github.com/ProseMirror/prosemirror-schema-basic/blob...
Example of a document converted to JSON: https://tiptap.dev/export