Showing posts with label richtextarea. Show all posts
Showing posts with label richtextarea. Show all posts

Sunday, April 19, 2015


Rich Text Areas / Field , lets is like a small editor which lets you format your content. Thats really cool feature when you want that field to merged into a PDF / Email or in an document. But whats not so cool is when you add an RTF to a Visualforce page you no longer can rerender the page and you have to let the page refresh fully. Thats really sad.

The visualforce RTF editor uses CKEditor which is widely used for the same purpose and has an open API / Method, which exactly was the Idea behind the custom-rtf component. Introduce some JS in the page and customize the toolbar and along with bring back the ability to rerender the page.

Introducing Custom-rtf

  • Lets you customize the Toolbars
  • Lets you rerender the VF page
  • Easy to using vf component

Syntax




Attributes

  • targetclass : Styleclass of the Textarea that needs to be rendered as RTF
  • toolbar : Different toolbars available

Toolbar options

  • Full
  • Visualforce
  • HomePageComponent
  • SalesforceBasic
  • EmailMultiFormat
  • Email
  • SalesforceLight
  • Knowledge
  • KnowledgeWithIframes
  • ServiceCommunity

Screenshot




Github / Installation 






Sunday, January 25, 2015


You might faced a challenged, atleast once while developing pages, where you need to rerender the page which contains a <apex:inputFile/> or an Rich Text area field <apex:textarea richtext="true"/> . There is no out of the box solution for this but there is alternative solution where you can implement a CKEditor to do so.

How can I solve this ?


I have been using ckeditor for quite sometime and eventually developed a vf component for myself called "customrtf". Customrtf is based on salesforce's rich text implementation and borrows code from it. This is the very fist version of the component, and many other features will come eventually.

What it does ?


  • Lets you convert a textarea into a richtext area
  • Allows re-rendering of the page

How to use it ?