emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EWW/SHR Feature Request


From: Willem Rein Oudshoorn
Subject: Re: EWW/SHR Feature Request
Date: Sat, 22 Mar 2014 11:22:03 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (darwin)

"T. V. Raman" <address@hidden> writes:

> Now that we have shr and eww, it would be nice to have a function
> that takes an html string  and returns a formatted representation
> (replete with properties etc.)  something like 
> (shr-format-html-string html-string) -> Return: Formatted string
> suitable for insertion into a buffer. 

I have been using this function for a while


(defun salesforce-insert-html (html)
  "Insert at current point, the 'rendered' HTML."
  (when html
    (shr-insert-document
     (with-temp-buffer
       (insert html)
       (libxml-parse-html-region (point-min) (point-max))))))


Wim Oudshoorn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]