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

Use Chrome Extension to manipulate the markdown #856

Open
AnguoZhao2020 opened this issue Sep 11, 2023 · 1 comment
Open

Use Chrome Extension to manipulate the markdown #856

AnguoZhao2020 opened this issue Sep 11, 2023 · 1 comment

Comments

@AnguoZhao2020
Copy link

sometimes, we need some private function to process the document automatically
eg.,

  1. global search and replace by regex
  2. quickly remove some specific characters, like blank or continuous blank etc
  3. collate 2 language text or vice versa, de-collate for translation purpose

I use chrome extension version 3
now, I can get the markdown from localStorage.getitem("currentDocument"), property "body"

but, how can i write back the updated text to the editor? and make the document in editor refreshed?

@AnguoZhao2020
Copy link
Author

It's not elegant that,
after process the current document
I store the result back to local storage "files"
then, use 'location.reload();' force the tab refresh, and get my desired effects
is there a better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant