Custom WYSIWYG Fields
By Paul
0/5 based on 0 votes. The median rating is 0.
By Paul
This code should allow WYSIWYG editing of a custom field 'fcktest':
<IF {THISMEMBERPOSTEDITOR} is WYSIWYG>
<?php
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('fcktest') ;
$oFCKeditor->ToolbarSet = 'Basic'; // uncomment to use basic tools
$oFCKeditor->Create() ;
?>
<textarea id="fcktest_wysiwyg_hidden" rows="5" cols="45"
style="display:none;">{ARTICLEFCKTEST}</textarea>
<script type="text/javascript">
if (typeof(FCKeditor_OnComplete) == 'undefined'){
function FCKeditor_OnComplete( editorInstance ){
if
(document.getElementById(editorInstance.Name+'_wysiwyg_hidden') != null){
editorInstance.SetHTML(document.getElementById(editorInstance.Name+'_wysiwyg
_hidden').value);
}
}
}
</script>
<ELSE>
<textarea name="fcktest" rows="5" cols="45">{ARTICLEFCKTEST}</textarea>
</IF>
<?php
include("fckeditor/fckeditor.php") ;
$oFCKeditor = new FCKeditor('fcktest') ;
$oFCKeditor->ToolbarSet = 'Basic'; // uncomment to use basic tools
$oFCKeditor->Create() ;
?>
<textarea id="fcktest_wysiwyg_hidden" rows="5" cols="45"
style="display:none;">{ARTICLEFCKTEST}</textarea>
<script type="text/javascript">
if (typeof(FCKeditor_OnComplete) == 'undefined'){
function FCKeditor_OnComplete( editorInstance ){
if
(document.getElementById(editorInstance.Name+'_wysiwyg_hidden') != null){
editorInstance.SetHTML(document.getElementById(editorInstance.Name+'_wysiwyg
_hidden').value);
}
}
}
</script>
<ELSE>
<textarea name="fcktest" rows="5" cols="45">{ARTICLEFCKTEST}</textarea>
</IF>
Rating:
0/5 based on 0 votes. The median rating is 0.
Submitted: 06/20/09
Description: A hack to allow WYSIWYG editors for custom fields.
Views:
92 views. Averaging 0 views per day.
In the most recent 30 day period, there've been 0 views.

Print
E-Mail