Ext.net inside the Kindeditor Rich text box (to solve the problem of kindeditor not showing and background fetching value)

Source: Internet
Author: User

Last Saturday, from 10 o'clock in the morning to 12 o'clock in the evening, the compatibility of Ext.net and Kindeditor was finally fixed. For the principle of ext.net, I am a rookie, say do not understand. the two problems I encountered were that the problem one was not to show the Kindeditor control through Ext:resourcemanager inside the <documentready handler= "Createeditor ();"/> solved, the problem is that the value of the Kindeditor control will not go backstage, is not receiving value in the foreground, but I can receive its value by clicking the Full-screen button, so the use of <click onevent= "Btnaddsave_ Click " before=" Editor.fullscreen (false); " > The way to solve it. The following code is directly affixed. Because of too much code, I paste the key code directly.

1.aspx Head Code:

<script type= "Text/javascript" >
Load Editor
var editor;
function Createeditor () {
Editor = Kindeditor.create ("#txtAddContent", {
Resizetype:1,
Uploadjson: '. /.. /tools/upload_ajax.ashx?action=editorfile&iswater=0 ',
Filemanagerjson: '. /.. /tools/upload_ajax.ashx?action=managerfile ',
Allowfilemanager:true,
Fullscreenmode:false
});
}
</script>

2.body inside the Code 1th place:

<form id= "Form1" runat= "Server" >
<ext:resourcemanager id= "ResourceManager1" runat= "Server" directmethodnamespace= "liuqing" >
<Listeners>
<documentready handler= "Createeditor ();"/>
</Listeners>
</ext:ResourceManager>

3.body inside the Code 2nd place:

<ext:container runat= "Server" title= "content" collapsible= "true" anchorhorizontal= "95%" >
<Content>
<textarea id= "txtaddcontent" name= "txtaddcontent" style= "width:99%;
Height:350px;visibility:hidden; "runat=" Server ></textarea>
</Content>
</ext:Container>

4.body inside the code 3rd place:

<ext:button id= "Btnaddsave" runat= "Server" text= "save" icon= "Disk" >
<DirectEvents>
<click onevent= "Btnaddsave_click" before= "Editor.fullscreen (false);" >
<eventmask showmask= "true" msg= "Saving"/>
</Click>
</DirectEvents>
</ext:Button>

5. Background CS Code:

String Content = This.txtAddContent.Value.Trim ();

Ext.net inside the Kindeditor Rich text box (to solve the problem of kindeditor not showing and background fetching value)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.