<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Integrating CKEditor and JqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>wang19851121 on Integrating CKEditor and JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p29555</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p29555</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thank you very much for this code.</p>
<p>Show error msg &#160;"The editor instance "xxx" is already attached to the provided element." , when i used ckeditor in ckeditor v4.2 .</p>
<p>But &#160;i used this code in ckeditor v3.5.3 , it&#39;s OK.</p>
</p>
<p>Armstrong</p>
]]></description>
        	        	<pubDate>Fri, 27 Sep 2013 05:39:05 +0300</pubDate>
        </item>
        <item>
        	<title>apostolix on Integrating CKEditor and JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p28352</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p28352</guid>
        	        	<description><![CDATA[<p>Can someone please provide a full example of this code because I am a little confused about how to integrate this code in my grid script!</p>
<p>Thank you</p>
]]></description>
        	        	<pubDate>Thu, 28 Feb 2013 19:40:08 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Integrating CKEditor and JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p19177</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p19177</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thank you very much for this code. I hope it will be a usefull for a lot of people.</p>
<p>Kind Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 17 Aug 2010 23:15:03 +0300</pubDate>
        </item>
        <item>
        	<title>tonier on Integrating CKEditor and JqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p18972</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/integrating-ckeditor-and-jqgrid#p18972</guid>
        	        	<description><![CDATA[<p>Last night (GMT+7) I have tried to load CKEditor as the WYSIWYG editor when I need to add or editing data with form editing features of JqGrid. Maybe someone out there can learn from what I have learnt that night, at least, you do not need to fell headache&#160;<img class="spSmiley" style="margin:0" title="Embarassed" src="/blog/wp-content/forum-smileys/sf-embarassed.gif" alt="Embarassed" /> as much as I do (<em>I am newbie with less experiences with JqGrid</em> <img class="spSmiley" style="margin:0" title="Cool" src="/blog/wp-content/forum-smileys/sf-cool.gif" alt="Cool" />).</p>
<p>NB: I assume the field name that need to edit with CKEditor is &#39;<strong>keterangan</strong>&#39;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4360' value='Select Code' data-codeid='sfcode4360' /></p>
<div class='sfcode' id='sfcode4360'>/**<br />&#160;* we want to use CKEDITOR, then we need to replace it field before form edit shown<br />&#160;*/<br />function ab_afterShowForm(ids) <br />{<br />&#160;&#160; &#160;if( CKEDITOR.instances.keterangan )<br />&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;try {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;CKEDITOR.instances.keterangan.destroy();<br />&#160;&#160; &#160;&#160;&#160; &#160;} catch(e) {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;CKEDITOR.remove( &#39;keterangan&#39; );<br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;//CKEDITOR.instances.keterangan = null;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;CKEDITOR.replace( &#39;keterangan&#39;,<br />&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;height: 80,<br />&#160;&#160; &#160;&#160;&#160; &#160;toolbar:<br />&#160;&#160; &#160;&#160;&#160; &#160;[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;[&#39;Bold&#39;,&#39;Italic&#39;,&#39;Underline&#39;,&#39;Strike&#39;,&#39;-&#39;,&#39;Subscript&#39;,&#39;Superscript&#39;]<br />&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;&#160;&#160; &#160;removePlugins : &#39;maximize,resize,scayt&#39;<br />&#160;&#160; &#160;});<br />&#160;&#160; &#160;// JQGrid<br />&#160;&#160; &#160;// we need to get selected row in case currently we are in Edit Mode<br />&#160;&#160; &#160;selID = $(&#39;#catdnd&#39;).getGridParam(&#39;selrow&#39;); // get selected row<br />&#160;&#160; &#160;// I don&#39;t know how to get the current mode is, in Editing or Add new?<br />&#160;&#160; &#160;// then let&#39;s find out if <br />&#160;&#160;&#160; //navigational buttons are hidden for both of it and selID == null &#60;&#8211; Add mode ^0^<br />&#160;&#160; &#160;if( !($(&#39;a#pData&#39;).is(&#39;:hidden&#39;) &#124;&#124; $(&#39;a#nData&#39;).is(&#39;:hidden&#39;) &#38;&#38; selID==null))<br />&#160;&#160; &#160;{ // then it must be edit?<br />&#160;&#160; &#160;&#160;&#160; &#160;va = $(&#39;#catdnd&#39;).getRowData(selID);<br />&#160;&#160; &#160;&#160;&#160; &#160;CKEDITOR.instances.keterangan.setData( va[&#39;keterangan&#39;] );<br />&#160;&#160; &#160;}<br />};</p>
<p>/**<br />&#160;* CKEDITOR didn&#39;t automaticaly replace our &#39;keterangan&#39; value then it need to set manually<br />&#160;*/<br />function ab_beforeSubmit(data)<br />{<br />&#160;&#160; &#160;data[&#39;keterangan&#39;] = CKEDITOR.instances.keterangan.getData();<br />&#160;&#160; &#160;return [true];<br />};<br />/**<br />&#160;* What if currently in edit mode and user click navigational button?<br />&#160;*/<br />function ab_afterclickPgButtons(whichbutton, formid, rowid)<br />{<br />&#160;&#160; &#160;//$(&#39;#catdnd&#39;).getRowData(rowid);<br />&#160;&#160; &#160;va = $(&#39;#catdnd&#39;).getRowData(rowid);<br />&#160;&#160; &#160;CKEDITOR.instances.keterangan.setData( va[&#39;keterangan&#39;] );<br />&#160;&#160; &#160;//return [true];<br />}</p>
</div>
<p>Then like commonly rules, attach that function into our JqGrid &#8230;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3507' value='Select Code' data-codeid='sfcode3507' /></p>
<div class='sfcode' id='sfcode3507'>[ snif ... snif ... ]<br />$(jqg_ID).jqGrid({<br />&#160;&#160; &#160;[ snif ... snif ... ]<br />&#160;&#160; &#160;&#160;&#160; &#160;colModel:<br />&#160;&#160; &#160;&#160;&#160; &#160;[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;[ snif ... snif ... ],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<strong>{name:&#39;keterangan&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editable:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;edittype:&#34;textarea&#34;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editoptions:{size:80,rows:&#34;2&#34;,cols:&#34;10&#34;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;editrules:{edithidden:true}}</strong>,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;[ snif ... snif ... ]<br />&#160;&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;[ snif .. snif ... ]<br />}).navGrid(&#39;#pagerdnd&#39;,<br />&#160;&#160; &#160;{edit:true,add:true,del:true},<br />&#160;&#160; &#160;{height:350, width:731,reloadAfterSubmit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;afterSubmit: your_after_submit_edit,<br />&#160;&#160; &#160;&#160;&#160; &#160;<strong>afterclickPgButtons: ab_afterclickPgButtons</strong>,<br />&#160;&#160; &#160;&#160;&#160; &#160;<strong>beforeSubmit: ab_beforeSubmit</strong>,<br />&#160;&#160; &#160;&#160;&#160; &#160;<strong>afterShowForm: ab_afterShowForm</strong><br />&#160;&#160; &#160;}, // update data<br />&#160;&#160; &#160;{height:350, width:731,reloadAfterSubmit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;afterSubmit: your_after_submit_add,<br />&#160;&#160; &#160;&#160;&#160; &#160;<strong>beforeSubmit: ab_beforeSubmit</strong>,<br />&#160;&#160; &#160;&#160;&#160; &#160;<strong>afterShowForm: ab_afterShowForm</strong><br />&#160;&#160; &#160;}, // insert data<br />&#160;&#160; &#160;{height:120, width:300,reloadAfterSubmit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;afterSubmit: your_after_submit_delete<br />&#160;&#160; &#160;} // delete data<br />);<br />[ snif ... snif ... ]</div>
</p>
<p>That&#39;s it <img class="spSmiley" style="margin:0" title="Cool" src="/blog/wp-content/forum-smileys/sf-cool.gif" alt="Cool" /></p>
<p><em>(My apologies for bad English</em>)</p>
]]></description>
        	        	<pubDate>Thu, 05 Aug 2010 07:04:18 +0300</pubDate>
        </item>
</channel>
</rss>