Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html->hiccup conversion #407

Closed
filipesilva opened this issue Oct 17, 2019 · 3 comments
Closed

html->hiccup conversion #407

filipesilva opened this issue Oct 17, 2019 · 3 comments

Comments

@filipesilva
Copy link

Heya,

This is a feature request.

Cursive, another popular editor for Clojure, has a handy feature where it will ask to convert HTML strings to Hiccup when pasting them into Clojure/Script files. This functionality is similar to what's provided in https://htmltohiccup.herokuapp.com/. It would be handy to have it in Calva as well.

@filipesilva
Copy link
Author

That site seems to mostly run hiccup-bridge in https://github.com/seabre/htmltohiccup/blob/master/src/htmltohiccup/conversion.clj

(ns htmltohiccup.conversion
  (:require [hiccup-bridge.core :as hicv]
            [clojure.pprint :as pp]))

(defn to-hiccup [hcp]
  (-> (hicv/html->hiccup hcp)
      (pp/pprint)
      (with-out-str)))

@n2o
Copy link

n2o commented Dec 17, 2021

I'd love to see this feature. It is so handy to have it directly backed into the editor when pasting an html snippet :-)

PEZ added a commit that referenced this issue Mar 21, 2023
* Infra for #407
* WIP: not exposed yet
@PEZ PEZ mentioned this issue Mar 21, 2023
17 tasks
@filipesilva
Copy link
Author

Wow wasn't expecting this to be added :D thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants