为织梦dedecms不同页面中百度ueditor编辑器设置不同宽度(2)

$code = '<script type="text/javascript" charset="gbk" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/editor_config.js"></script>

<script type="text/javascript" charset="gbk" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/editor_all_min.js"></script>

<link rel="stylesheet" type="text/css" href="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/themes/default/ueditor.css"/>

<textarea name="'.$fname.'" id="'.$fname.'" style="width:100%;">'.$fvalue.'</textarea>

<script type="text/javascript">

var ue = new baidu.editor.ui.Editor({ initialFrameWidth:824 });ue.render("'.$fname.'"); //红色处为修改宽度

</script>';

if($gtype=="print")

{

echo $code;

}

else

{

return $code;

}

}

else {

/*

// ------------------------------------------------------------------------

// 当前版本,暂时取消dedehtml编辑器的支持

// ------------------------------------------------------------------------

require_once(DEDEINC.'/htmledit/dede_editor.php');

$ded = new DedeEditor($fname);

$ded->BasePath = $GLOBALS['cfg_cmspath'].'/include/htmledit/' ;

$ded->Width = '100%' ;

$ded->Height = $nheight ;

$ded->ToolbarSet = strtolower($etype);

$ded->Value = $fvalue ;

if($gtype=="print")

{

$ded->Create();

}

else

{

return $ded->CreateHtml();

}

*/

}

}

3. 在编辑器调取页面将以下代码:

<?php GetEditor("body","",350,"Member"); ?>

改为:

<?phpGetEditorD("body","",350,"Member"); ?>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/2082751868843df90b5d62fd3a1c2af5.html