2

古い問題のように思えて申し訳ありませんが、現在、この問題で 3 時間以上立ち往生しており、解決できません。どうすれば解決できるか教えてください。

最近、Web ページに CKEditor を追加しました。問題は、要素をインライン スタイルwidthに変換することです。これらの属性はサーバー側で設定されており、保持したいと思います。考えられる多くの解決策を試しましたが、それらは古いようです。height attributesimg

使用したスクリプトは次のとおりです。

<script language="JavaScript"  type="text/javascript">
 CKEDITOR.config.toolbar = [
    { name: 'document', items : [ 'Source','-','Save','DocProps','Preview' ] },
    { name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] },
    { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Find', 'Replace', '-', 'SelectAll', ] },
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
    '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
    { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar',  ] },
    { name: 'styles', items: ['Format', 'Font', 'FontSize' ] },
    { name: 'colors', items: [ 'TextColor' ] },
    { name: 'tools', items: ['Maximize', 'About' ] }
];
CKEDITOR.config.height = 500;
CKEDITOR.config.contentsLangDirection = 'rtl';

CKEDITOR.replace( 'htmlp1', {
    allowedContent:
        'img(left,right)[!src,alt,width,height];' 
} );
            </script>

どうすればいいのか、はっきり教えてください。

どうもありがとうございました。

4

0 に答える 0