Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > save editable text (using FCKEditor) in another document View modes: 
User avatar
Member
Member
calais-club-internet - 3/25/2009 3:14:13 AM
   
save editable text (using FCKEditor) in another document
I would like to display and edit text using FCKEditor in one document and save it in another one.

Any suggestion to how do this?

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 3/25/2009 3:28:05 AM
   
RE:save editable text (using FCKEditor) in another document
Hi,

I'm not sure if I get this correctly, so could you please try to describe us this request in more detail way?

Thank you.

Best Regards,
Miroslav Remias

User avatar
Member
Member
calais-club-internet - 3/25/2009 3:40:05 AM
   
RE:save editable text (using FCKEditor) in another document
ok;

first document:
I have a text; this text can be edited in the edit view using FCKEditor (rich text)
When i save the document, the text i saved in another document

- document "products"
- document "product1"

Products document:
Live site : display the "description" text of the document "product1"
Edit view : display the "description" text of the document "product1" in FCKEditor
Save : save the text in the "description" text of the document "product1"

Product1 document
contain a "description" text (rich text)

Why i asked that ? for a question of re-use and for a question of confort for edit (wysiwig)

in static html, the site should look like that
- products_ 1 with 2 column
column 1 : product 1 description
column 2 : product 2 description
- products_2 with 2 column
column 1 : product 2 description
column 2 : product 3 description

constraint :
- the description text of the products must be editable in the pages product_1 and products_2
- can have only 1 description text by product

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 3/25/2009 5:50:11 AM
   
RE:save editable text (using FCKEditor) in another document
Hi,

Thank you for the detail description. However, this is rather un-usual request and our system is not currently capable of performing such operations, since there are no relationships between products. Anyway, I think you can achieve this using CustomSKUInfoProvider where you can override SetSKUInfo method, since this method is called also when you are changing the product description on product tab of your product.

This is standard custom SetSKUInfo method:

        /// <summary>
/// Sets (updates or inserts) specified sKU.
/// </summary>
/// <param name="sKU">SKU to set.</param>
public void SetSKUInfo(object sKU)
{

SKUInfoProvider.SetSKUInfo((CMS.Ecommerce.SKUInfo)sKU);

//your code goes here …
//get description from current SKUInfo and save the description to another product
}


Best Regards,
Miroslav Remias

User avatar
Member
Member
calais-club-internet - 3/25/2009 7:02:32 AM
   
RE:save editable text (using FCKEditor) in another document
Sorry if i not clear in my description

If I understand what you suggest,
it's like save the description text of 1 product (product1) in the description file of another (product2)

But, in fact, this is not what i looking for !
forget the products of the ecommerce

in the standard way of use, i think i must do like this
- displayPage1 (column to display the mainContent of child documents)
- contentPage1 (to edit the mainContent)
- contentPage2 (to edit the mainContent)
- displayPage2 (colum to display the mainContent of child documents)
- contentPage2 (linked documents) (to edit the mainContent)
- contentPage3 (to edit the mainContent)

But, this is not ok for my site because
- the edit and the display are not in the same page
- manage linked documents is too complicate if their number is huge

I will prefer an organisation like that :

- displayPage1 (column to display AND edit the mainContent of the selected contentPage - contentPage1 and contentPage2)

- displayPage2 (column to display AND edit the mainContent of the selected contentPage - contentPage2 and contentPage3)

folder content
- contentPage1
- contentPage2
- contentPage3

to do that, in the displayPage, i need to :
- select the document from which I want to display the mainContent (custom data webpart?)
- in live site, display the mainContent corresponding to the selected documents
- in edit view, use FCKEditor (rich text) to edit and save the text (the text must be save in the selected documents.

hope this is must clear
I know it's an un-usual request
But I have to migrate a cms from MSCMS to Kentico

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 4/15/2009 4:52:46 AM
   
RE:save editable text (using FCKEditor) in another document
Hi,

You can use Document selector form control in your document type definition to tight your document (DisplayPage) to another one (ContentPage). Then you can create similar web part to editable region (text) web part and you would need to get content from the document (ContentPage) which is chosen by the Document selector field and also save the content to document (ContentPage) which is chosen by document selector in form tab of your document (DisplayPage).

Best Regards,
Miroslav Remias.