Challenge Overview
Project Overview
We need a Richtext editor Visualforce component, that can work in Visualforce, and supports both right-to-left text and left-to-right-text.
Business Requirements
The primary user of the component, will be a Visualforce Developer. The developer would like to show some html content in the proposed text editor. The html content can come from a visualforce controller or from an sObject in the database. The html content could be ltr text (such as English, French) or could be rtl text (such as Arabic, Hebrew) There should be an option to configure toolbar buttons in the component as well.
Please use SCEditor (http://www.sceditor.com/), as the text editor.
Technical Requirements
-
Create a Visualforce component, wrapping the editor code, javascript, jQuery
-
The component should support 2 way data binding eg <c:TextEditor value=”{!Account.description}” />.
-
Developer should not be required to do any manipulation, before passing / retrieving data out of Editor
-
The component can be used multiple times on the same page
-
The component should be take html stored in the database.
-
Add a single custom command to change the direction from rtl to ltr. See Custom command Example here
-
There should be an attribute in the component, to show more or less toolbar buttons. The possible options should be minified, small, normal, large. Please store the options in a such a way, in the Visualforce component, to make it easy to change it in future. Default should be normal eg <c:TextEditor Toolbar=”normal” />
-
Visualforce Component, should render inside a pageBlockSection, of columns 1 or 2 or more.
References
We love the MultiSelect Controller component, ease of use from developer perspective. Please feel free to use it as a reference
SFDC Requirements
-
Code coverage should be 95%+
-
Test methods should not rely on existing data in the organization
-
Follows secure coding guidelines for Apex and Visualforce (eg using with sharing / without sharing appropriately)
Final Submission Guidelines
-
Create a custom object called "Text Templates" with a Long Text field called "HTML Content".
-
A VF page using the standard controller of the "Text Templates" object which includes the text editor and stores the output in Html Content Field
-
The VF page, with the component, that showcases the all features of the component.
-
Unmanaged package containing all code and objects, and example pages.
-
A video showing the page in action.
- Source code as zip
Coding Guidelines
-
Coding Guidelines http://wiki.developerforce.com/page/Apex_Code_Best_Practices
-
Secure Coding Guidelines http://wiki.developerforce.com/page/Secure_Coding_Guideline