dimasites / modx-ckeditor

CKEditor integration into MODx Revolution
3 stars 1 forks source link

content height not respected #3

Open minauen opened 2 weeks ago

minauen commented 2 weeks ago

When using this extra as a template variable, the height setting is not being respected and the height collapses to 38px.

Maybe I'm missing something, but as your images show that it should be working.

dimasites commented 2 weeks ago

Hi @minauen, please ckeck some moments:

If it helps, or not, please tell me :)

Which version of MODX you are using?

minauen commented 2 weeks ago

Hi,

Thanks for your input. I'm using Modx 3.0.5 with CKEditor 1.4.6

I added the autogrow to the ckeditor.extra_plugins in the system settings. However that plugin ist not available under manager/assets/components/ckeditor/ckeditor/plugins/

So until now it still does not work, I assume because of the missing plugin? How/Where do I get that plugin from?

UPDATE: I did find: https://ckeditor.com/cke4/addon/autogrow and added it. However nothing changes. When using ckeditor on a richt text template variable, the editor height collapses to 38px

Any more thoughts?

UPDATE 2: I downloaded the plugin for version 4.8.0. and added it but then realize the following error in the console:

image

I changed the skin from moono to moono-lisa. The error is gone, but the height is still not correct.

image
denius-dev commented 2 weeks ago

Hi there! I solved the problem...

At first, CKEditor 4.25-lts (2024) required, but component for MODX included old version (2017), so autogrow plugin wont work...

Solve: I manually updated CKEditor and added plugin autogrow, read full info in my article: https://modx.pro/howto/23916

minauen commented 2 weeks ago

sorry but I can't read that...

denius-dev commented 2 weeks ago
  1. Replace folder /manager/assets/components/ckeditor/ckeditor/ with this one: https://mega.nz/file/M8FFECbZ#-p6TvJPLlQgobq6ZBFYuHYYtCwbZkUrGlpBbPm2JFCI

  2. Change MODX system settings -> CKeditor namespace:

ckeditor.extra_plugins - autogrow,codemirror,codeTag,autocomplete,ajax,textwatcher,xml,textmatch,panelbutton,balloontoolbar,autolink,tableresize,youtube,html5video,balloonpanel,button,lineheight,tabletools,html5audio,textindent,texttransform,floating-tools,yaqr,wordcount,placeholder,textselection

ckeditor.remove_plugins - forms,pagebreak,newpage,print,language,smiley,exportpdf,about

ckeditor.skin - office2013

ckeditor.toolbar -

[[
    { name: "document", groups: [ "mode", "document", "doctools" ], items: [ "Source", "-", "Save", "NewPage", "ExportPdf", "Preview", "Print", "-", "Templates" ] },
    { name: "clipboard", groups: [ "clipboard", "undo" ], items: [ "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Undo", "Redo" ] },
    { name: "editing", groups: [ "find", "selection", "spellchecker" ], items: [ "Find", "Replace", "-", "SelectAll", "-", "Scayt" ] },
    "/",
    { name: "basicstyles", groups: [ "basicstyles", "cleanup" ], items: [ "Bold", "Italic", "Underline", "Strike", "Subscript", "Superscript", "-", "CopyFormatting", "RemoveFormat" ] },
    { name: "paragraph", groups: [ "list", "indent", "blocks", "align", "bidi" ], items: [ "NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote", "CreateDiv", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "-", "BidiLtr", "BidiRtl", "Language" ] },
    { name: "links", items: [ "Link", "Unlink", "Anchor" ] },
    { name: "insert", items: [ "Image", "Table", "HorizontalRule", "Smiley", "SpecialChar", "Iframe" ] },
    "/",
    { name: "styles", items: [ "Styles", "Format", "Font", "FontSize" ] },
    { name: "colors", items: [ "TextColor", "BGColor" ] },
    { name: "tools", items: [ "Maximize", "ShowBlocks" ] },
    { name: "others", items: [ "-" ] },
    { name: "about", items: [ "About" ] }
]]

ckeditor.toolbar_groups -

[[
    { name: "document", groups: [ "mode", "document", "doctools" ] },
    { name: "clipboard", groups: [ "clipboard", "undo" ] },
    { name: "editing", groups: [ "find", "selection", "spellchecker" ] },
    { name: "forms" },
    "/",
    { name: "basicstyles", groups: [ "basicstyles", "cleanup" ] },
    { name: "paragraph", groups: [ "list", "indent", "blocks", "align", "bidi" ] },
    { name: "links" },
    { name: "insert" },
    "/",
    { name: "styles" },
    { name: "colors" },
    { name: "tools" },
    { name: "others" },
    { name: "about" }
]]

You will get this:

9f0673fe1522de380a08ae89fb031507

PROFIT!

P.S. If something wrong, reload page with cache: Ctrl+F5 or Ctrl+Shift+R (Win), Cmd+Shift+R (MacOS)