From richfaces-svn-commits at lists.jboss.org Mon Nov 14 13:45:24 2011 Content-Type: multipart/mixed; boundary="===============6755128594019732012==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r22929 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directories. Date: Mon, 14 Nov 2011 13:45:24 -0500 Message-ID: <201111141845.pAEIjO44019837@svn01.web.mwc.hst.phx2.redhat.com> --===============6755128594019732012== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: lfryc(a)redhat.com Date: 2011-11-14 13:45:24 -0500 (Mon, 14 Nov 2011) New Revision: 22929 Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richeditor-Advanced_configuration.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richeditor-Basic_usage.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richeditor-Client_side_event_handlers.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richeditor-Internationalization_and_localization.xml_= sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richeditor-Toolbar_customization.xml_sample Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Compo= nent_Reference-Rich_inputs.xml modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/t= abl-richeditor.xml Log: RFPL-1574: finished rich:editor documentation Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/cha= p-Component_Reference-Rich_inputs.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Rich_inputs.xml 2011-11-14 13:56:40 UTC (rev 22928) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Rich_inputs.xml 2011-11-14 18:45:24 UTC (rev 22929) @@ -804,7 +804,7 @@ <sgmltag><rich:editor></sgmltag> - + @@ -817,34 +817,36 @@ <rich:editor> component is based on C= KEditor implementation. - When rendering <rich:editor>, textare= a is rendered to the page and once the page is completely loaded (ready sta= te), textarea is enhanced by CKEditor script and replaced with full-feature= d WYSIWYG editor. = + When rendering <rich:editor>, textare= a is rendered to the page and once the page is completely loaded (ready sta= te), textarea is enhanced using CKEditor script and replaced with full-feat= ured WYSIWYG editor. = - - Note that ResourceServlet has to be registered manually in ord= er to serve editor resources correctly (JavaScript, CSS, images). Check Ric= hFaces Developer's Guide out for details. - - - Note that <rich:editor> requires havi= ng <h:body> component as ancestor in the view for = rendering editor's JavaScript resource dependencies correctly. - =
Basic usage Basic usage requires the value attribut= e to point to the expression for the current value of the component. - - - ]]> - + + Basic usage of <sgmltag><rich:editor></sgmlta= g> + + + Note that editor does produce HTML markup and to be ab= le render it's output, markup needs to be output as unescaped (as with <h:outputText> component in example above). + + Dimensions of editor can be managed using width= and height attributes. - Attribute readonly can be used to s= witch editor into read-only mode. + The readonly attribute can be used = to switch editor into read-only mode. - tabindex is used as for any other f= orm inputs. + The tabindex attribute specifies th= e position of the current element in the tabbing order for the current docu= ment. + + ResourceServlet has to be registered for url-pattern /org.richfaces.resources/* in order to se= rve editor resources (JavaScript, CSS, images) correctly. Check = RichFaces Developer's Guide out for details. + + + The <rich:editor> requires having= <h:body> component present in the view and being = its ancestor for rendering resource dependencies correctly. +
=
@@ -860,7 +862,7 @@ - editorStyle, editorClass: c= ustomizes style of the editor + editorStyle, editorClass: c= ustomizes style of the CKEditor instance @@ -869,46 +871,55 @@ - - Attributes above gives possibility to customize style of b= oth, editor and underlying textarea. = -
=
Editor skins - <rich:editor> comes with two axis= of skinnability. + The <rich:editor> comes with skin= nability using attribute skin and two approaches: - At first, standard skin called richfaces is o= ptimized to suit rest of the component suite look & feel and behaves re= garding to which RichFaces skin is currently chosen. + At first, <rich:editor> has defau= lt skin called richfaces that is optimized to suit rest of the= component suite look & feel and behaves regarding to which RichFaces s= kin is currently chosen (refer to RichFaces Developer's Guide for details about Skinning and theming). -
- - - - - - - A <rich:editor> with = default richfaces editor skin rendered against several RichFac= es Skin options. - - - -
+ + The skin <code>richfaces</code> of <sgmltag><ric= h:editor></sgmltag> +
+ + + + + + + A <rich:editor> w= ith default richfaces editor skin rendered against several Ric= hFaces Skin options. + + + +
+ + A <rich:editor> with default = richfaces editor skin rendered against several RichFaces Skin = options. + +
Second option gives you possibility to use any other skin = for CKEditor, either from standard distribution or downloaded one or custom= one. In distribution, there are three skins bundled: kama, v2, offic= e2003. -
- - - - - - - A CKEditor distribution skins kama, v2 and office2003. - - - -
+ + Examples of <sgmltag><rich:editor></sgmltag> = skins in CKEditor distribution +
+ + + + + + + A CKEditor distribution skins kama, v2 and office2003. + + + +
+ + A CKEditor distribution skins kama, v2 and office2003. + +
=
@@ -917,69 +928,38 @@ Basic set of <rich:editor> attrib= utes allows to support common use-cases for WYSIWYG editor. - CKEditor imlementation supports much more configuration op= tions that the ones which are exposed to basic set of attributes. + However CKEditor imlementation supports much more configur= ation options. Attribute config gives possibility = to define any advanced configuration option which CKEditor supports. - Configuration is written in JavaScript object format and i= ts value interpolated for EL expressions (making configuration dynamic). + Configuration is written in JavaScript object format and i= ts value is interpolated for EL expressions (making configuration dynamic). - There are two options to define configuration: = config attribute and component facet with name confi= g. Facet takes precedence over attribute when both defined. + There are two options to define configuration: = config attribute and facet with name config. Facet takes precedence over attribute when both defined. - - - - - - startupFocus: #{userPreferences.startupFocus} - - - ]]> - + In samples above, <rich:editor> i= s configured to take focus after load of the page regarding to user prefere= nces. Definitions using either attribute or facet are adequate. - - For further configuration options, refer to CKEditor 3 Dev= eloper Guide ( http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setti= ng_Configurations ) and CKEditor 3 configuration reference ( http://docs.ck= source.com/ckeditor_api/symbols/CKEDITOR.config.html ). - + + For further configuration options, refer to CKEditor 3 Developer Guide and CKEditor 3 configuration = reference. +
=
Toolbar customization - <rich:editor> supports toolbar attribute able to switch between toolbar configuration= s. = + <rich:editor> supports toolbar attribute able to switch between configurations of too= lbar's button set. = - There are two configurations available: basic= (default), full. = + There are two configurations available: basic= (default), full (enables all of the features). = - It is possible to define custom toolbar using CKEditor too= lbar definition notion: + It is possible to define custom toolbar using CKEditor too= lbar configuration in config facet: - - - - toolbar_CustomToolbar: - [ - { name: 'document', items : [ 'NewPage','Preview' ] }, - { name: 'clipboard', items : [ 'Cut','Copy','Paste','P= asteText','PasteFromWord','-','Undo','Redo' ] }, - { name: 'editing', items : [ 'Find','Replace','-','Sel= ectAll','-','Scayt' ] }, - { name: 'insert', items : [ 'Image','Flash','Table','H= orizontalRule','Smiley','SpecialChar','PageBreak' - ,'Iframe' ] }, - '/', - { name: 'styles', items : [ 'Styles','Format' ] }, - { name: 'basicstyles', items : [ 'Bold','Italic','Stri= ke','-','RemoveFormat' ] }, - { name: 'paragraph', items : [ 'NumberedList','Bullete= dList','-','Outdent','Indent','-','Blockquote' ] }, - { name: 'links', items : [ 'Link','Unlink','Anchor' ] = }, - { name: 'tools', items : [ 'Maximize' ] } - ] - - - ]]> - + Note that toolbar name (CustomToolbar) needs = to match the toolbar_<name> configuration option. @@ -991,25 +971,25 @@ <rich:editor> comes with attribut= e lang which allows to change localization of editor. - For language configuration options, refer to http://www.w3= .org/TR/html4/struct/dirlang.html. + For language configuration options, refer to http://www.w3.org/TR/html4= /struct/dirlang.html. - lang attribute is influences follow= ing settings: + The lang attribute influences follo= wing settings: - underlying textarea - specifies the i18n settings = for received and submitted content = + underlying textarea - specifi= es the i18n settings for received and submitted content = - editor value - specifies the i18n settings for val= ue edited in WYSIWYG mode + editor value - specifies the = i18n settings for value edited in WYSIWYG mode - default settings of localization of editor control= s and interface + default settings of localization of editor controls and interface @@ -1017,13 +997,9 @@ However localization of interface is in first place locali= zed using the browser configuration (usually determined by client system se= ttings). - To force editor to use specific localization of interface,= you can use custom CKEditor configuration option language as = in following sample: + To force editor to use specific localization of interface,= you can use advanced CKEditor configuration option language a= s in following sample: - - - ]]> - + The sample above force editor to use french interface, sup= ressing the browser preferred settings. @@ -1032,7 +1008,7 @@
Client-side event handlers - <rich:editor> component produces = set of events for handling component specific interaction. + The <rich:editor> component produ= ces set of events for handling component specific interaction. @@ -1064,20 +1040,7 @@ Events can be handled either by registering JavaScript eve= nt handler or by attaching JSF behavior: - - - - - - - - - - - - ]]> - + Example above shows editor and its output, which is update= d each 1 sec after each instant change or immediately after user focus leav= es editor area. @@ -1109,7 +1072,7 @@ getEditor() - Returns the CKEditor object associated to given ins= tance of <rich:editor> component. + Returns the CKEditor object instance associated to = given <rich:editor> component. @@ -1117,7 +1080,7 @@ getInput() - Returns the textarea associated textarea. + Returns the associated textarea. @@ -1149,7 +1112,7 @@ isDirty() - Returns true if editor is focuse= d and it was edited from last focus event (reset by blur event and using se= tValue(newValue) call and when component re-rendered) + Returns true if editor is focuse= d and it was edited from last focus event (reset by blur event, by using setValue(newValue) call and when component is re-rendered) @@ -1157,7 +1120,7 @@ isValueChanged() - Returns true if the control's va= lue has been changed from the default (reset by setValue(newValue) call and= when component re-rendered) + Returns true if the control's va= lue has been changed from the default (reset by setValue(newValue) call and when component is re-rendered) Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richeditor-Advanced_configuration.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Advanced_configuration.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Advanced_configuration.xml_sample 2011-11= -14 18:45:24 UTC (rev 22929) @@ -0,0 +1,7 @@ + + + + + startupFocus: #{userPreferences.startupFocus} + + \ No newline at end of file Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richeditor-Basic_usage.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Basic_usage.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Basic_usage.xml_sample 2011-11-14 18:45:2= 4 UTC (rev 22929) @@ -0,0 +1,3 @@ + + + \ No newline at end of file Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richeditor-Client_side_event_handlers.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Client_side_event_handlers.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Client_side_event_handlers.xml_sample 201= 1-11-14 18:45:24 UTC (rev 22929) @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richeditor-Internationalization_and_localization.= xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Internationalization_and_localization.xml= _sample (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Internationalization_and_localization.xml= _sample 2011-11-14 18:45:24 UTC (rev 22929) @@ -0,0 +1 @@ + \ No newline at end of file Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richeditor-Toolbar_customization.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Toolbar_customization.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richeditor-Toolbar_customization.xml_sample 2011-11-= 14 18:45:24 UTC (rev 22929) @@ -0,0 +1,18 @@ + + + toolbar_CustomToolbar: + [ + { name: 'document', items : [ 'NewPage','Preview' ] }, + { name: 'clipboard', items : [ 'Cut','Copy','Paste','-','Undo','Re= do' ] }, + { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-',= 'Scayt' ] }, + { name: 'insert', items : [ 'Image', 'Flash', 'Table', 'Horizontal= Rule', = + 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] }, + '/', + { name: 'styles', items : [ 'Styles','Format' ] }, + { name: 'basicstyles', items : [ 'Bold','Italic','Strike','-','Rem= oveFormat' ] }, + { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','= Outdent','Indent','-','Blockquote' ] }, + { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, + { name: 'tools', items : [ 'Maximize' ] } + ] + + \ No newline at end of file Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/ski= nning/tabl-richeditor.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/= tabl-richeditor.xml 2011-11-14 13:56:40 UTC (rev 22928) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/skinning/= tabl-richeditor.xml 2011-11-14 18:45:24 UTC (rev 22929) @@ -22,11 +22,9 @@ - span.cke_skin_richfaces + .cke_skin_richfaces - - ??? - + @@ -41,9 +39,7 @@ .cke_skin_richfaces .cke_wrapper - - ??? - + @@ -58,9 +54,7 @@ .cke_skin_richfaces .cke_dialog_body - - ??? - + @@ -79,9 +73,7 @@ .cke_skin_richfaces .cke_dialog_title<= /term> - - ??? - + @@ -112,9 +104,7 @@ .cke_skin_richfaces .cke_path a, .cke_skin_richfaces .cke_path .cke_empty - - ??? - + @@ -129,9 +119,7 @@ .cke_skin_richfaces .cke_button a.cke_on - - ??? - + @@ -150,9 +138,7 @@ .cke_skin_richfaces .cke_button a:hover, .cke_skin_richfaces .cke_button a:focus, .cke_skin_richfaces .cke_button a:active - - ??? - + @@ -164,27 +150,6 @@ tabBackgroundColor background-color - = - - - - - .rf-ii-btn-p - - - This class defines styles for the buttons for the in-place input = when they are pressed. - - - - - - tabBackgroundColor - background-color - - - panelBorderColor - border-color - = @@ -194,9 +159,7 @@ .cke_skin_richfaces .cke_rcombo a:active .cke_skin_richfaces .cke_rcombo a:hover - - ??? - + @@ -227,9 +190,7 @@ .cke_skin_richfaces .cke_rcombo .cke_openbutton - - ??? - + --===============6755128594019732012==--