mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
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:
18
discussions-icons/insertqr.svg
Normal file
18
discussions-icons/insertqr.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
@ -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
|
||||
|
||||
|
||||
@ -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.
BIN
sdkjs-plugins/content/insertQR/resources/dark/icon@1.75x .png
Normal file
BIN
sdkjs-plugins/content/insertQR/resources/dark/icon@1.75x .png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user