Skip to content

crmtogether/HTMLEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

HTMLEditor

Add in the ability to make a multiline text field a WYSIWYG editable field in Sage CRM. We use https://summernote.org/ to implement the editor.

The code in the

src

folder.

We ship the component with it "HTMLEditor.zip". -To create your own Sage CRM component zip up the contents of the src folder.

To install then import via Sage CRM's Component Manager. This creates 2 folders in your CustomPages folder called

HTMLEditor
CRMTogetherOS

When installed a new menu item is created in the

Administration

area of Sage CRM called

CRM Together OS

OS=Open Source

Within this there is a tab called

HTML Editor

Click this and add in your fields you wish to make use the WYSIWYG editor. Note that you should have created a new mutli-line text field to be used as the WYSIWYG field. For example create a field on cases called case_ct_problemnote_html and add this to the CaseDetailBox screen. This screen should also have the case_problemnote field on it.

The in the editor set the JSON to be

[
{
"htmlfield":"case_ct_problemnote_html",
"textfield":"case_problemnote"
}
]

Save this (click update) and this the creates a file in the

WWWRoot\js\custom\htmlEditor.js

which searches for these fields and applys the screen update.

If you have historical records then the following SQL can be used to update the new html fields.

update cases
set 
case_ct_problemnote_html=case_problemnote
where case_ct_problemnote_html is null

update cases
set 
case_ct_solutionnote_html=case_solutionnote
where case_ct_solutionnote_html is null

Known issues:

Firefox seems to paste images twice into the editor. The work-around is to delete one of the images.

Update - fixed july 2020  

21 July 22 - updated code to resize the iframe and remove the blank space

About

Add in the ability to make a multiline text field a WYSIWYG editable field in Sage CRM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •