Giter Club home page Giter Club logo

wysiwyblogger's Introduction

WysiwyBlogger

This was created in response to a bug reported for Markdown Here: in Blogger, after saving a draft, it was no longer possible to unrender from HTML to Markdown.

I discovered that Blogger is mangling the title attribute name that Markdown Here uses to hold the original Markdown, thereby preventing MDH from find it. Furthermore, Blogger was mangling the inline style attribute name (for some elements -- only deeper elements?). However, when publishing the blog post, the styles would be restored. In addition to hurting MDH's functionality and interfering with its sweet styling being shown properly, this also affects the styling of rich content which has been pasted from other web pages.

So, not only does this weird mangling behaviour totally break Markdown Here, it breaks the what-you-see-is-what-you-get (wysiwyg) user experience that everyone expects.

Installation

Get it from the Chrome Store.

If you would like to be able to use a hotkey to trigger it, you can use the Chrome's built-in hotkey assignment feature by pasting this address into Chrome:
chrome://extensions/configureCommands

How to use

Just place focus into the Blogger edit box and click the toolbar button. All inline styles will be immediately restored. And Markdown Here will work again.

Note: The address of the page you're on while editing your blog post must begin with https://www.blogger.com/. If this is too restrictive, please create an issue.

Not using Chrome?

In Firefox (and probably Internet Explorer and Safari) you can create a bookmark with the "Address" or "Locaton" or "URL" set to the following JavaScript. It will function basically the same as the extension.

javascript:((function(){var doc=document;while(doc.activeElement.contentDocument)doc=doc.activeElement.contentDocument;var elems=doc.activeElement.querySelectorAll('[data-blogger-escaped-style]');for(var i=0;i<elems.length;i++){elems[i].style.cssText=elems[i].dataset.bloggerEscapedStyle;}elems=doc.activeElement.querySelectorAll('[data-blogger-escaped-title]');for(var i=0;i<elems.length;i++){elems[i].title=elems[i].dataset.bloggerEscapedTitle;}})())

Ugly logo

If anyone wants to provide a better one, that isn't such a copyright violation, that would be great.

wysiwyblogger's People

Contributors

adam-p avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mdalhaz sitedata

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.