Forum OpenACS Q&A: Passing value to richtext editor

Request notifications

Posted by Paul Babin on
Hello -

I've been successfully calling ckeditor4 in a number of our applications in 5.9.1 for create pages: however, I'm running into a issue for ae pages and am curious if anyone else has run into this issue.

The issue is that when I add ckeditor in the tcl code for an ae page - the value is not passed to the editor. I've seen something like this when I was adding ckeditor on the adp page and fixed it by making sure the value was passed after ckeditor was initiated. I'm not sure how to address this in the tcl code and hope it is just a minor fix.

This is the code that I am currently using

        {value "$publish_body"}
        {options {
            editor ckeditor4
            plugins {autogrow,codemirror,widget,lineutils,colordialog,dialog,fakeobjects,filebrowser,popup,iframedialog,balloonpanel,"..more plugins"}
            customConfig {/resources/ckeditor/config.js}
            skin {office2013,/resources/ckeditor/skins/office2013/}
Any suggestions are greatly appreciated.

Posted by Gustaf Neumann on
since nobody is replying, i am trying to help, although i know nobody who is using "ae". The whole initialization happens for the ckeditor via initialize_widget [1], which adds finally the init code via "template::add_script" and "template::head::add_javascript". These settings are picked up later in the "blank-master".

Since "ae" stands probably for "Anonymous Evaluation", it might be the case that there are different templates are used (maybe omitting the blank-master). Do you see the JavaScript code in the page, where the editor is supposed to appear?

all the best


Posted by Paul Babin on
My apologies, it looks like ae is something we use internally here. Add-Edit. These are pages that are used both to add content to the database in a news package or an events package and to edit the content using the same form.

ckeditor is successfully added to both instances (add and edit) - so the initialization widget is doing what it is supposed to do as far as rendering the editor: however, the data inputed into publish_body during the add does not appear when you edit.