[Top][All Lists]

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

Re: EWW/SHR Feature Request

From: T.V Raman
Subject: Re: EWW/SHR Feature Request
Date: Fri, 21 Mar 2014 11:36:43 -0700

I mean the following:

(shr-format-html-string "<bo>Strong</b>")

Returns a string with the font face set to 'bold or whatever else
shr chooses to use.

Here is the code I have in emacspeak:
(defun emacspeak-webutils-html-string (html-string)
  "Return formatted string."
  (or (require 'shr) (error "Need  emacs 24.4"))
  (with-temp-buffer "*html-format*"
                    (setq buffer-undo-list t)
                    (insert html-string)
                    (shr-render-region  (point-min) (point-max))

Vibhav Pant writes:
 > On Fri, Mar 21, 2014 at 9:14 PM, T. V. Raman <address@hidden> wrote:
 > > 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.
 > By formatted string, do you mean the entire content of the page to
 > which the address redirects too, or the webpage title?
 > -- 
 > Vibhav Pant
 > address@hidden

reply via email to

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