Login
Username

Password



Lost Password?

Register now!

Guests cannot post in this forum

You cannot start a new topic in this forum

Action
list-tree Tree order sort-down Newest first previous Previous topic next Next topic

なし Using fckeditor in eguide

There is request for eguide, support FCKeditor.

HTML editor like that, Basically use just "textarea" modification. Therefore some JavaScript code add in edit form page. No need modify code, just edit template in local.

So, there is description page; adding fckeditor to XCL (Japanese). I modified same like that.


Template: eguide_admin.html
@@ -128,14 +128,28 @@
 </p>
 <{/if}>
 </fieldset>
 <h3><{$smarty.const._MD_INTROTEXT}></h3>
-<{$summary_textarea}>
+<script type="text/javascript" src="<{$xoops_url}>/common/fckeditor/fckeditor.js"></script>
+<script type="text/javascript">
+function fckeditor_exec(target, width, height, url) {
+	var area_width = width;
+	var area_height = height;
+	var xoops_url = url;
+	var oFCKeditor = new FCKeditor( target, area_width, area_height, "Default" );
+	oFCKeditor.BasePath = xoops_url + "/common/fckeditor/";
+	oFCKeditor.ReplaceTextarea();
+}
+</script>
+<textarea id="summary" name="summary"><{$summary|escape}></textarea>
 <h3><{$smarty.const._MD_EXTEXT}></h3>
 <textarea name="body" wrap="virtual" cols="60" rows="10"><{$body}></textarea>
+<script>
+fckeditor_exec("summary", "100%", "350", "<{$xoops_url}>");
+fckeditor_exec("body", "100%", "350", "<{$xoops_url}>");
+</script>
 
-<h3><{$smarty.const._MD_EVENT_STYLE}></h3>
-<{$input_style}>
+<input type="hidden" name="style" value="0" />
 
 <h3><{$smarty.const._MD_RESERV_SETTING}></h3>
 <div><input type="checkbox" name="reservation" value="1"<{if $reservation}> checked<{/if}>/> <{$smarty.const._MD_RESERV_DESC}></div>
 <div>

You can use WYSWYG editing.
--
Nobuhiro YASUTOMI (MySite Users Webmaster)

なし Re: Using fckeditor in eguide


XOOPS 2.4 has CKeditor, so quick hack templaes from eguide 2.54

eguide_admin.html
@@ -148,20 +148,19 @@
 <h3><{$smarty.const._MD_EXTEXT}></h3>
 <textarea name="body" wrap="virtual" cols="60" rows="10"><{$body}></textarea>
 
 <{if $use_fckeditor}>
-<script type="text/javascript" src="<{$xoops_url}>/common/fckeditor/fckeditor.js"></script>
[color]+<script type="text/javascript" src="<{$xoops_url}>/class/xoopseditor/ckeditor/ckeditor/ckeditor.js"></script>[/color]
 <script type="text/javascript">
 function fckeditor_exec(target, width, height, url) {
-	var area_width = width;
-	var area_height = height;
-	var xoops_url = url;
-	var oFCKeditor = new FCKeditor( target, area_width, area_height, ("<{$use_fckeditor}>"=="Basic")?"Basic":"Default" );
-	oFCKeditor.BasePath = xoops_url + "/common/fckeditor/";
-	oFCKeditor.ReplaceTextarea();
+	CKEDITOR.replace( target, {
+		toolbar:("<{$use_fckeditor}>"=="Basic")?"Basic":"Default",
+	} );
+}
+window.onload = function() {
+    fckeditor_exec("summary", "100%", "350", "<{$xoops_url}>");
+    fckeditor_exec("body", "100%", "350", "<{$xoops_url}>");
 }
-fckeditor_exec("summary", "100%", "350", "<{$xoops_url}>");
-fckeditor_exec("body", "100%", "350", "<{$xoops_url}>")
 </script>
 <input type="hidden" name="style" value="0" />
 <{else}>
 <h3><{$smarty.const._MD_EVENT_STYLE}></h3>

list-tree Tree order sort-down Newest first previous Previous topic next Next topic


© 2008 MySite Web Service