问题
I am using ckeditor 3 and ckfinder. When I press on the picture button in ckeditor I see the popup of ckfinder. I can select a picture and it will be inserted in the content of ckeditor. Now I would like to pass some query string parameters in the ckfinder popup. In the connector I would like to read this query string parameter.
For example:
connectorBuilder.SetAuthenticator(customAuthenticator)
.LoadConfig()
.SetRequestConfiguration(
(request, config) =>
{
var someQueryStringParameter = request.QueryParameters.SingleOrDefault(s => s.Key == "someQueryStringParameter").Value;
});
回答1:
Hi I don't know which CKFinder you're using but for CKFinder 3 (with CKEditor 4) you can use connectrInfo when using CKFinder.setupCKEditor() integration method (pass it in config
object). Also check CKEditor integration docs.
In the connector I would like to read this query string parameter.
It is important to note that these parameters from connctorInfo
will not be added to URL in popup but to requests directed to CKFinder. For configuration like:
var editor = CKEDITOR.replace( 'editor1', {
height:350
} );
CKFinder.setupCKEditor( editor, {
connectorInfo : 'mytoken=7a9s0s1',
pass : 'test,another',
test : 'mytest',
another : 'myanother'
} );
the result will be as follows:
来源:https://stackoverflow.com/questions/49134903/how-to-pass-query-string-parameters-in-ckeditor-for-the-picture-ckfinder-butto