Page 1 of 1

Adding HTML editor

Posted: 2017-02-02 20:36
by Boat Girl
New to this so please bear with me while I learn.

Using version 5.60
Following information from the Support FAQ page shown below. In my case on the contacts_templateDV.html.
I downloaded the nicEditor zip file, unzipped and copied the 2 files ( a .js and .gif ) to the folder where the created app is stored locally replaced the old with these 2 new files.

The line
and find this line:

Code: Select all

new nicEditor().panelInstance('fieldname');
is not displayed anywhere within the contacts_templateDV.html? Is this still valid on 5.6?
I want to have a rich (HTML) area field, but I want to be able to edit its HTML source code as well. Is this possible?

A. The rich editor component that comes with AppGini doesn't support code editing ... So, you should use this NicEditor version instead (unzip and copy the 2 files to the folder where you generated your application, replacing the existing ones).

The next step is to open the generated "templates/tablename_templateDV.html" file in a text editor (where tablename is the name of the concerned table) and find this line:
new nicEditor().panelInstance('fieldname');
(where fieldname is the name of the concerned field) ... Change that to:
new nicEditor({ fullPanel : true }).panelInstance('fieldname');

Re: Adding HTML editor

Posted: 2017-02-12 15:22
by a.gneady
Sorry for the long delay. This code should still work fine with AppGini 5.60 .. Just make sure the concerned field is configured as a "Rich (HTML) area" in AppGini. The code in the template file would contain your actual field name rather than "fieldname" mentioned in the code.