wasavi
wasavi copied to clipboard
Ignore certain HTML elements? E.g: writing an email in Gmail and ignore signature
Is it possible to allow wasavi to edit certain fields but ignore HTML elements? For example, if I use wasavi to compose an email it will strip the picture from my signature, ideally I'd like to be able to edit text and simply ignore HTML elements.
Edit: Might be already possible, ref: https://github.com/akahuku/wasavi/issues/96
Same problem here. I tried with #96 but without result
I might have misunderstood how it works, I can't get it to ignore certain elements that I want to use Wasavi with. It flat out either doesn't let me edit it, or spits out plaintext back if I write and save.
Please let me know if this could be a possible feature.
First, wasavi is just a plain text editor. So I have no ideas that make wasavi be able to edit a HTML element. Therefore I considered one solution:
- Treat some elements (a, img, object, embed...) as special
- Give an ID to these elements (If an element has the ID originally, just use it)
- Generate plain text.
- a element -> "<wasavi:a id='temporarily-id'>content</wasavi:a>"
- img, object, embed element -> "<wasavi:img id='temporarily-id'/>", "<wasavi:object ... />", "<wasavi:embed ... />"
- Edit in wasavi
- When rewriting a text in a target element, wasavi rebuilds a rich text from plain text. About these special element, wasavi reuses each original element which corresponds to the ID
When you don't edit these special <wasavi:xxx> tags, that will be ignored consequently. How does that look?
About editing content editable element including gmail, a little change was brought to wasavi 0.6.635 (wiki document). However whether this change is practical or not, I do not still uncertain. I want to hear a variety of opinions.
@akahuku Your changes work wonderfully for me, my HTML signature remains, will have to test it a bit but so far it's very promising! Thank you!
Hi @akahuku
This markdown evolution seems introduce this bug #134 who affect some people. I'll tried to find the cause when I have little bit of times.