After having installed the Author sample application which is really rather cool, the insertion into the current document still doesn't work. While trying to understand, I noticed that the insert functionality expects the URI lexicon to be enabled which wasn't mentioned in the documentation but enabling that got me one step further. Now it seems that the items found cannot not be inserted anywhere in the current document. By the way, I stuck with the defaults right now (i.e. Policies, Sections, Recommendations). That's the error message: ERROR error: XML markup cannot be inserted in the specified location. which I was able to track down to this function in MarkLogicWordAddin:
line 1368 MLA.insertWordOpenXML = function(opc_xml) and more particularly that line: line 1381 window.external.insertWordOpenXML(v_docx); Glad for any ideas cheers, Jakob. On Wed, Feb 22, 2012 at 17:59, Jakob Fix <[email protected]> wrote: > Thanks Pete, > > That's extra quick! :) > I got the zip. and am updating the msi as we speak. > > cheers, > Jakob. > > > > On Wed, Feb 22, 2012 at 17:45, Pete Aven <[email protected]> wrote: >> Hi Jakob, >> >>>>1) this add-in is supported for Word 2010 >> >> Though the Addin will install with Office 2010; the XQuery API with the >> Toolkit that is currently available on the Community site is only compatible >> with the 2007 flavor of WordprocessingML. >> >> The TK has been updated for 2010 support and is currently sitting in a >> repository where I'm told it will be released onto the unsuspecting, Office >> 2010-hungry masses at some point in the future. Until then, I've sent you a >> snapshot of the latest TK to your gmail. >> >>>>2) if so how can one debug this Javascript code (is there a Firebug-like >>>>tool for this?). >> >> Unfortunately, not really. Develop for the Addin application everything you >> can outside of the context of the Addin (In IE). You can use IE8 which has >> developer tools which are similar to firebug. Once the application is in >> the Addin however and calling the MLA functions, your only real option is to >> use alert()s (or write logs to the filesystem, which you can do with >> JavaScript in IE). >> >>>> MLA.insertBlockContent(response.responseXML); >> >> This function really should be deprecated. Instead of the simple Sample, >> I'd suggest using the Sample Authoring App to enrich/insert content, and >> taking a look at the function MLA.insertWordOpenXML(). Once you grok this >> function, you will keep Word in a headlock and pretty much have your way >> with it. :) >> >> Hope this helps, >> Pete >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Jakob Fix >> Sent: Wednesday, February 22, 2012 11:24 AM >> To: General Mark Logic Developer Discussion >> Subject: [MarkLogic Dev General] Word add-in and Word 2010 >> >> Hello again, >> >> I've installed successfully the Word add-in and am able to search using the >> sample provided in the download. >> >> However, the double-click on a found paragraph does not insert it into the >> currently open word document. Probably, things have changed from >> 2007 to 2010. Looking at the Javascript code in Samples/search/search.js I >> find this line: >> >> MLA.insertBlockContent(response.responseXML); >> >> which seems to be responsible for the insertion of the paragraph. >> >> So, I guess my question is whether 1) this add-in is supported for Word 2010 >> and 2) if so how can one debug this Javascript code (is there a Firebug-like >> tool for this?). >> >> cheers, >> Jakob. >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
