File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 146146 bubbles : true ,
147147 cancelable : false
148148 } ) ) ;
149+
150+ // This will render GitHub Writer - https://github.com/ckeditor/github-writer
151+ // https://github.com/ckeditor/github-writer/blob/8dbc12cb01b7903d0d6c90202078214a8637de6d/src/app/plugins/quoteselection.js#L116-L127
152+ const githubWriter = newComment . closest ( [
153+ 'form.js-new-comment-form[data-github-writer-id]' ,
154+ 'form.js-inline-comment-form[data-github-writer-id]'
155+ ] . join ( ) ) ;
156+ if ( githubWriter ) {
157+ window . postMessage ( {
158+ type : 'GitHub-Writer-Quote-Selection' ,
159+ id : Number ( githubWriter . getAttribute ( 'data-github-writer-id' ) ) ,
160+ text : text
161+ } , '*' ) ;
162+ }
149163 } ) ;
150164
151165 var svg = document . createElementNS ( "http://www.w3.org/2000/svg" , "svg" ) ;
You can’t perform that action at this time.
0 commit comments