function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

integrate CKEditor for a rich text in custom popup

I have integrate CKEditor for a richtext. Richtext is within a custom popup. Custom popup shows up with a click of a command button. On the custom popup, RichText is shown as a regular textbox and CKEditor is missing.
NagendraNagendra (Salesforce Developers) 
Hi Manu123,

Please find the below code:

VisualForce Page:
<apex:page controller="CKEditController" showHeader="false" id="thepageid">
   <apex:form id="theformid">
  <apex:includescript value="{!URLFOR($Resource.CkEditor, 'ckeditor/ckeditor.js')}" />
  <apex:inputtextarea id="editor1" value="{!Parameter}" styleClass="ckeditor" richtext="false"/>
  <apex:commandButton value="save" onclick="abc()"/>
<apex:form >
  <script type="text/javascript">
window.onload = function()

function abc()
var element = CKEDITOR.instances['editor1'].getData();

Apex Controller:
public class CKEditController
    public string Parameter{get; set;}
    public CKEditController()
        Parameter = ApexPages.currentPage().getParameters().get('p7');
    //    return null;

I hope this information has been helpful in resolving your issue.   Please be sure to mark a post that has been most helpful as “Best Answer” to help others in the community with similar questions.

Best Regards,
John Henry 31John Henry 31
I trust this data has been useful in settling your issue. Kindly make certain to check a post that has been generally useful as "Most intelligent Answer" to help other people locally with comparative inquiries.
Debaranjan GhoshDebaranjan Ghosh
I implemented this by using Static Resource with uploaded file from
and Got the below output is this what should it show 

User-added image
for Controller :
Parameter = ApexPages.currentPage().getParameters().get('p7');

Debug Logs shows :
16:51:33:009 VARIABLE_ASSIGNMENT [EXTERNAL]|this.Parameter|"This is a Rich Text \r\n"|0x21d10d23

How ever I dont see any Alert when I click on save button
Can you please clarify.

Debaranjan Ghosh
Dylan Hughes 12Dylan Hughes 12
To use TinyMCE for displaying large text field in a custom content form and have image and link functionality similar to a standard form, add these external plugins with some additional configuration. The plug-ins are compatible with TinyMCE version 6.3.1.