microdotblog / issues

43 stars 0 forks source link

Feature: Add Grammarly support #176

Open dive opened 4 years ago

dive commented 4 years ago

Hello there,

When you post from the web-interface (https://micro.blog/posting), all the options to check spelling and grammar are disabled.

It would be nice to add support for Grammarly. I assume, there are a lot of people for whom English is a second or even third language. But they still want to post without obvious mistakes.

P.S. I am using Firefox 76.0.1 on macOS Catalina. As I said, I tried to investigate the problem using the article above with the following steps (I am not familiar with web development, so, it is better to double-check):

  1. Select the textarea for the inspection in Firefox
  2. Open Console and run the following code
    
    console.log("Is TextArea accessible by Grammarly?", 
            !($0.ownerDocument.defaultView.location != window.top.location 
              && ( $0.ownerDocument.defaultView.frameElement == null 
                  || ( $0.ownerDocument.defaultView.frameElement != null 
                      && $0.ownerDocument.defaultView.frameElement.getAttribute('src') !=null))))

console.log("SUT name:", $0.nodeName) console.log("TextArea size:", $0.clientWidth, "x", $0.clientHeight) console.log("Is TextBox compatible with Grammarly >=(310x38)?", ($0.clientWidth > 301 && $0.clientHeight > 38))

3. Results are:

Is TextArea accessible by Grammarly? true SUT name: TEXTAREA TextArea size: 0 x 13 Is TextBox compatible with Grammarly >=(310x38)? false

manton commented 4 years ago

Thanks @dive. You're right, we use a JavaScript component for the Markdown syntax highlighting which unfortunately breaks some built-in system behavior. I've been wanting to add a way to disable the highlighting (or find another way to do it).