【问题标题】:set tabindex and class to FCK editor将 tabindex 和 class 设置为 FCK 编辑器
【发布时间】:2011-03-04 06:36:57
【问题描述】:

我无法将 tabindex 设置为 FCK 编辑器。我正在为 fck 编辑器使用以下 php 代码

require_once("".$abspath."fckeditor/fckeditor.php");
    $oFCKeditor = new FCKeditor("shippinginfo") ;
    $oFCKeditor->BasePath = "../fckeditor/" ;
    $oFCKeditor -> Height = '300';
    $oFCKeditor -> Width = '900';
    $oFCKeditor->Value = stripslashes(str_replace("\\","",$product_shippinginfo));
    $oFCKeditor->Create() ;

我也喜欢 class 到 fck 编辑器

谁有这个想法

【问题讨论】:

标签: php javascript editor ckeditor fckeditor


【解决方案1】:

顺便说一句,我谷歌并找到以下解决方案...试试这个

open file: fckeditor.js

find there a string:


return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="0" scrolling="no" tabindex=4></iframe>' ;

添加类

Find these lines in FCKedotor's confing file, fckconfig,js

// This will be applied to the body element of the editor
FCKConfig.BodyId = '' ;
FCKConfig.BodyClass = '' ;

reference

【讨论】:

    【解决方案2】:

    通过textarea替换方法我们可以设置tabindex。所以它的工作原理谢谢!

     <textarea name="product_long_tescription" id="product_long_tescription"  tabindex="4"  class="fillbymaster" >init value</textarea>
    
    
    window.onload = function()
    {
    var oFCKeditor = new FCKeditor( 'product_long_tescription' ) ;
    oFCKeditor.BasePath = "../fckeditor/" ;
    oFCKeditor.Height = "300" ; 
    oFCKeditor.Width = "900";
    oFCKeditor.ReplaceTextarea() ;
    
    }
    

    【讨论】:

      猜你喜欢
      • 2011-10-05
      • 2013-12-17
      • 2011-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-25
      相关资源
      最近更新 更多