feat(ai-scribe): Fix when using multiple composer, get multiple overlay icons
This commit is contained in:
@@ -48,7 +48,7 @@ class HtmlUtils {
|
||||
editor.parentNode.replaceChild(newEditor, editor);''',
|
||||
name: 'unregisterDropListener');
|
||||
|
||||
static const registerSelectionChangeListener = (
|
||||
static ({String name, String script})registerSelectionChangeListener(String viewId) => (
|
||||
script: '''
|
||||
let lastSelectedText = '';
|
||||
|
||||
@@ -58,6 +58,7 @@ class HtmlUtils {
|
||||
window.parent.postMessage(
|
||||
JSON.stringify({
|
||||
...data,
|
||||
viewId: '$viewId',
|
||||
name: 'onSelectionChange',
|
||||
}),
|
||||
"*"
|
||||
@@ -902,4 +903,10 @@ class HtmlUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static String getRandString(int len) {
|
||||
var random = Random.secure();
|
||||
var values = List<int>.generate(len, (i) => random.nextInt(255));
|
||||
return base64UrlEncode(values);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user