moved the GenerateQR event level, 1.75 icon name changed, icons parameter changed in the config.json file, insertqr.svg added to the discussions folder

This commit is contained in:
Serg-Kv
2024-03-22 18:00:31 +05:00
parent 53f40bdac8
commit 0d3e73649f
6 changed files with 26 additions and 9 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -13,8 +13,8 @@ The plugin uses:
3. Right-click on the selected text.
4. Click the "Set QR Color" radiobutton and select the color in the color picker.
5. Click the "Set Background Color" radiobutton and select the color in the color picker.
6. Set QR width and height if necessary (150 px is default value)
7. Click the "Insert QR" button
6. Set QR width and height if necessary.
7. Click the "Insert QR" button.
If you need more information about how to use or write your own plugin, please see this https://api.onlyoffice.com/plugin/basic

View File

@ -27,7 +27,7 @@
"ja": "プレゼンテーションおよびテキストエディターで簡単にQRコードを生成します。"
},
"url": "index.html",
"icons": ["resources/light/icon.png", "resources/light/icon@2x.png"],
"icons": "resources/%theme-type%(dark|light)/%scale%(default).%extension%(png)",
"icons2": [
{
"style": "light",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -35,6 +35,11 @@
// Display context menu if the text is selected
window.Asc.plugin.event_onContextMenuShow = function (options) {
// Attach event for context menu click on GenerateQR
window.Asc.plugin.attachContextMenuClickEvent('GenerateQR', function () {
console.log("GenerateQR clicked");
displayFunction(displaySettings);
});
if (options.type === "Selection") { // Check if the text is selected
// Execute method to get selected text
window.Asc.plugin.executeMethod("GetSelectedText", [{
@ -56,12 +61,6 @@
text: generateText('Insert QR')
}]
}]);
// Attach event for context menu click on GenerateQR
window.Asc.plugin.attachContextMenuClickEvent('GenerateQR', function () {
console.log("GenerateQR clicked");
displayFunction(displaySettings);
});
}
});
}