-
Notifications
You must be signed in to change notification settings - Fork 8
[HTML5 preview] Use asciidoctor.js when user chooses Offline mode #10
Comments
This application uses AngularJS. One workaround (for Chrome users) is to use the possibility to communicate between the AsciiDoctor Chrome extension and this application with the feature "Message passing" http://developer.chrome.com/extensions/messaging.html @Mogztter will try this feature "Message passing" between an app and the AsciiDoctor Chrome extension. |
I Don't know what to suggest you, change AngularJs could be an option but it is the worst one because you will throw away a lot of work. |
@mgreau Yep, I will have a look this weekend. As an alternative, the next version of the extension will have a "Render selection" feature asciidoctor/asciidoctor-browser-extension#26 |
@lordofthejars indeed it is the worst one...for me :) |
Sending messages from web pages is working, I can receive a message with an AsciiDoc content from an application... But the message is received in the background script. That mean that I can't render directly the AsciiDoc content in HTML. I must open a new tab or window to load content scripts (Opal.js, Asciidoctor.js...) to be able to render the AsciiDoc content, then retrieve the generated HTML, close the tab or window and send a message back with the result. A bit complicated and not user friendly. Maybe you should look at sandbox environment to isolate Opal.js and Asciidoctor.js from Angular.js ? iframe ? 😢 |
Ok thanks for your test. |
Good news this morning, @anthonny released an angularjs directive to play with Asciidoctor. https://github.com/anthonny/angular-asciidoc-directive This is perfect for the offline mode (and maybe for online mode too). |
I close this issue for the 0.1-alpha3 release. |
When the writer choose to work on the offline mode, he also wants to see the output rendered in real-time.
It would be interesting to load asciidoctor.js file when the user works in offline mode so that the asciidoc source is rendered as HTML5.
The text was updated successfully, but these errors were encountered: