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

Ignore certain HTML elements? E.g: writing an email in Gmail and ignore signature #120

Open
stianeklund opened this issue Feb 19, 2016 · 6 comments

Comments

@stianeklund
Copy link

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: #96

@crivotz
Copy link

crivotz commented Feb 29, 2016

Same problem here.
I tried with #96 but without result

@stianeklund
Copy link
Author

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.

@akahuku
Copy link
Owner

akahuku commented Mar 21, 2016

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:

  1. Treat some elements (a, img, object, embed...) as special
  2. Give an ID to these elements (If an element has the ID originally, just use it)
  3. 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 ... />"
  4. Edit in wasavi
  5. 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?

@akahuku
Copy link
Owner

akahuku commented Apr 7, 2016

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.

@stianeklund
Copy link
Author

@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!

@prestancedesign
Copy link

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.

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

4 participants