[annotator-dev] Activating Markup plugin

Randall Leeds randall at bleeds.info
Fri May 6 20:09:19 UTC 2016


The master branch of Annotator is not published as a standalone script that
way at the moment. It's available through npm. If you do not typical
develop with CommonJS modules and a bundling tool, then this is not for you
yet.

I think you have to go back to pre-1.0 showdown. The one included in the
vendor directory of the 1.2.x branch should work.

On Mon, May 2, 2016 at 3:33 AM Ralph Heinkel <rh at ralph-heinkel.com> wrote:

> I Randall,
>
> sorry that I didn't mention this in my original post, I've tried to use
> older versions of showdown back to version 1.0, but getting always the same
> error.
> The old showdown version in
> https://github.com/openannotation/annotator/tree/v1.2.x/lib/vendor which
> you suggested to use however also raises a javascript exception.
>
> I would not have a problem to go to annotator 2.0a, and indeed I've tried
> this, but I couldn't figure out how the correct setup was (the problem are
> wrong or missing URLs for the css and js modules)
>
> <html>
>     <head>
>         <script src="https://code.jquery.com/jquery-1.11.3.js" <https://code.jquery.com/jquery-1.11.3.js>></script>
>         <script src="https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js" <https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js>></script>
>         <link rel="stylesheet" href="https://github.com/openannotation/annotator/releases/download/v2.0.0-alpha.3/annotator.min.css">
>         <script src="https://github.com/openannotation/annotator/releases/download/v2.0.0-alpha.3/annotator.min.js" <https://github.com/openannotation/annotator/releases/download/v2.0.0-alpha.3/annotator.min.js>></script>
>         <script src="https://github.com/openannotation/annotator/releases/download/v2.0.0-alpha.3/annotator.markdown.js" <https://github.com/openannotation/annotator/releases/download/v2.0.0-alpha.3/annotator.markdown.js>></script>
>     </head>
>     <body>
>         <div id="content"> <h1>Titel</h1> </div>
>         <script type="text/javascript">
>         jQuery(function ($) {
>             var app = new annotator.App()
>                     .include(annotator.ui.main, {element: document.body})
>                     .include(annotator.ui.markdown);
>             app.start();
>         });
>         </script>
>     </body>
> </html>
>
> Could you maybe direct me to correct URls for the js and css module? This
> would be very helpful. I've tried URls like
> https://github.com/openannotation/annotator/tree/2.0.x/ but didn't
> succeed.
>
> Thanks in advance,
>
> Ralph
>
>
>
> On 30.04.16 02:11, Randall Leeds wrote:
>
> You could also use an old version of Showdown. The v1.2.x branch contains
> one that should work in the lib/vendor directory.
>
> https://github.com/openannotation/annotator/tree/v1.2.x/lib/vendor
>
> On Fri, Apr 29, 2016 at 5:10 PM Randall Leeds <randall at bleeds.info> wrote:
>
>> If you check the issue tracker you can find a very similar issue [1].
>>
>> This issue has been fixed. Annotator v1.2.x has never been updated to
>> support the newer versions of Showdown.
>>
>> You could either backport the patch [2] and submit a pull request or try
>> to migrate to the development tip of Annotator.
>>
>> [1] https://github.com/openannotation/annotator/issues/542
>> [2]
>> https://github.com/openannotation/annotator/commit/83dfed16e2b4f1c9f6f8427f70c5cfb15f247039
>>
>> On Thu, Apr 28, 2016 at 2:08 AM Ralph Heinkel <rh at ralph-heinkel.com>
>> wrote:
>>
>>> Hi everyone,
>>>
>>> has anyone had success with activating the markup plugin with annotator
>>> 1.2?
>>> My minimal setup is:
>>>
>>> <html>
>>>     <head>
>>>         <link rel="stylesheet" href="http://assets.annotateit.org/annotator/v1.2.10/annotator.min.css" <http://assets.annotateit.org/annotator/v1.2.10/annotator.min.css>>
>>>         <script src="https://code.jquery.com/jquery-1.11.3.js" <https://code.jquery.com/jquery-1.11.3.js>></script>
>>>         <script src="https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js" <https://cdn.rawgit.com/showdownjs/showdown/1.3.0/dist/showdown.min.js>></script>
>>>         <script src="http://assets.annotateit.org/annotator/v1.2.10/annotator.min.js" <http://assets.annotateit.org/annotator/v1.2.10/annotator.min.js>></script>
>>>         <script src="http://assets.annotateit.org/annotator/v1.2.10/annotator.markdown.min.js" <http://assets.annotateit.org/annotator/v1.2.10/annotator.markdown.min.js>></script>
>>>     </head>
>>>     <body>
>>>         <div id="content">
>>>             <h1>Titel</h1>
>>>         </div>
>>>         <script type="text/javascript">
>>>         jQuery(function ($) {
>>>             $('#content').annotator().annotator('addPlugin', 'Markdown');
>>>         });
>>>         </script>
>>>     </body>
>>> </html>
>>>
>>> However the activation fails, and firebug report the following error:
>>>
>>>     *To use the Markdown plugin, you must include Showdown into the
>>> page first.*
>>>
>>> Obviously the showdown js module is loaded before annotator in the HTML
>>> above, what else can be wrong? Any help is very much appreciated.
>>>
>>> Thanks,
>>>
>>> Ralph
>>> _______________________________________________
>>> annotator-dev mailing list
>>> annotator-dev at lists.okfn.org
>>> https://lists.okfn.org/mailman/listinfo/annotator-dev
>>> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>>>
>>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20160506/551bed72/attachment-0004.html>


More information about the annotator-dev mailing list