Open hangpuyan opened 6 years ago
__block bool receiveEditorDidChangeEvents = _receiveEditorDidChangeEvents; weak typeof(self) weakSelf = self; JSContext ctx = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"]; ctx[@"contentUpdateCallback"] = ^(JSValue msg) { weak typeof(weakSelf) StrongSelf = weakSelf;
if (receiveEditorDidChangeEvents) { [StrongSelf editorDidChangeWithText:[StrongSelf getText] andHTML:[StrongSelf getHTML]]; } [StrongSelf checkForMentionOrHashtagInText:[StrongSelf getText]]; };
__block bool receiveEditorDidChangeEvents = _receiveEditorDidChangeEvents; weak typeof(self) weakSelf = self; JSContext ctx = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"]; ctx[@"contentUpdateCallback"] = ^(JSValue msg) { weak typeof(weakSelf) StrongSelf = weakSelf;