问题描述
我正在使用ckeditor 3和ckfinder。当我按下ckeditor中的图片按钮时,我会看到ckfinder的弹出窗口。我可以选择一张图片,它将被插入ckeditor的内容中。现在,我想在ckfinder弹出窗口中传递一些查询字符串参数。在连接器中,我想读取此查询字符串参数。
例如:
connectorBuilder.SetAuthenticator(customAuthenticator)
.LoadConfig()
.SetRequestConfiguration(
(request,config)=>
{
var someQueryStringParameter = request.QueryParameters.SingleOrDefault(s => s.Key == someQueryStringParameter)。Value;
});
我不知道您是哪个CKFinder如果使用CKFinder 3(但使用CKEditor 4),则可以使用
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;
});
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.
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:
这篇关于如何在ckeditor中为图片(ckfinder)按钮传递查询字符串参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!