1

I am trying to write a plugin in onlyoffice(4.4.3) and the plugin is expected to add a hyperlink to content of current doc. I spent quit a lot of time to search the related api in onlyoffice doc(https://api.onlyoffice.com/docbuilder/textdocumentapi), but just can't find it. Meanwhile seems the onlyoffice editor can do that in the UI.

My questions are:

  1. If it is feasible to add a hyperlink to content of current doc via the public apis?
  2. If yes, how to make that?
ShaoYang
  • 11
  • 1
  • 1

1 Answers1

0

There is no direct way way to add a hyperlink, but there is an alternative solution - try using PasteHtml method

window.Asc.plugin.executeMethod("PasteHtml", ["<a href=\"onlyoffice.com\">link text</a>"]);

New methods will be added soon to the documentation, we are already working on it

ibnpetr
  • 472
  • 2
  • 5