wasavi icon indicating copy to clipboard operation
wasavi copied to clipboard

Support per-website/element writeas settings

Open stephenh opened this issue 7 years ago • 1 comments

I was following the thread about using wasavi in gmail, and that using writeas=textAndBreak will make it work. That seems to work really well and is great.

I've put writeas=textAndBreak into my exrc, but I'm anticipating that certain websites will need certain writeas...e.g. gmail may want textAndBreak, but github may work better with html, etc.

stephenh avatar Nov 28 '16 15:11 stephenh

I think this is a very important issue, so I'd like to change writeas as follows:

  • Allow writeas to assign a string that can be parsed as JSON
  • JSON defines the value of writeas for each site

writeas will be set in your exrc as follows:

set writeas='{ \
  /* Give a site a simple writeas value */ \
  "http://example.com/*": "text", \
  /* Give the site an array of CSS selector and writeas pair */ \
  "http://exmaple.net/*": [ \
    { \
      "selector": "#element-id", \
      "writeas": "textAndBreak" \
    } \
  } \
}'

akahuku avatar Feb 07 '17 07:02 akahuku