I would like to edit some of the code behind for the PageProperties dialog and am not sure how to go about it.
In my case, all the data for the pages has been stored in a database. With the radEditor, I can retrieve the content and place it into the editor, but if I need to change the page title, meta tags, etc. I would need to use the PageProperties. The problem is that I don't want the page property data written back to the content window.
So, my thoughts were that if I can intercept the loading and saving of the PageProperties dialog, I could populate it with my data from the database and save it back.
Shawn
In my case, all the data for the pages has been stored in a database. With the radEditor, I can retrieve the content and place it into the editor, but if I need to change the page title, meta tags, etc. I would need to use the PageProperties. The problem is that I don't want the page property data written back to the content window.
So, my thoughts were that if I can intercept the loading and saving of the PageProperties dialog, I could populate it with my data from the database and save it back.
Shawn
5 Answers, 1 is accepted
0
Hello Soatley,
Please, see the following live example on the subject that will show you how to modify the RadEditor's built-in dialogs: Customize Built-in Dialogs.
Sincerely,
Rumen
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Please, see the following live example on the subject that will show you how to modify the RadEditor's built-in dialogs: Customize Built-in Dialogs.
Sincerely,
Rumen
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0

hacker
Top achievements
Rank 1
answered on 26 Mar 2009, 08:06 PM
Hi Rumen,
Thanks for the reply, but I don't think that answers my question. I did see the help topic, but in the case of the example, it just shows how to modify the dialog, not the code behind.
Did I miss something?
Shawn
Thanks for the reply, but I don't think that answers my question. I did see the help topic, but in the case of the example, it just shows how to modify the dialog, not the code behind.
Did I miss something?
Shawn
0

Mike
Top achievements
Rank 2
answered on 26 Mar 2009, 11:06 PM
I would like to know the answer to this question also. I retrieve data from an sql datasource and want to customize the title, keywords, description and most importantly the body tag along with some div tags before it is rendered in the editor.
For example, I need to insert a custom title in between the <title></title> tags and a custom background in the <body> tag. What is the code behind/javascript for this?
In my case, I am using a custom built Page Wizard that allows the user to select a page layout (from a custom toolbar in the editor), they then supply their title, description, keywords and select a background repeat image. I need to be able to intercept the pasteHtml() or the set_html() and insert these details before the html is written to content area of the editor.
Any light on this subject would be much appreciated as there is NO documentation anywhere that shows this kind of coding.
Thanks
Grant
0
Hi everyone,
Here is more information on your questions:
@Shawn
"...in the case of the example, it just shows how to modify the dialog, not the code behind."
You are correct, and the reason for this is very simple. There is no code-behind (specific to the dialog itself). If you examine the dialog you will see that all its configuration is set on the client-side using client code. Simply the values set in the editor's content area are read by the dialog (once that is it loaded).
@Grant
"...I need to be able to intercept the pasteHtml() or the set_html() and insert these details before the html is written to content area of the editor."
We just answered your support message, but here we will provide additional information as well.
Here is where/how to intercept the pasteHtml method:
http://demos.telerik.com/aspnet-ajax/editor/examples/onclientpastehtml/defaultcs.aspx
As far as set_html is concerned, there is no way to intercept it, but no editor dialog calls set_html - it is you (the developer) that calls this method - so all you need to do is make sure it sets the content you want, the way you want it.
All the best,
Tervel
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Here is more information on your questions:
@Shawn
"...in the case of the example, it just shows how to modify the dialog, not the code behind."
You are correct, and the reason for this is very simple. There is no code-behind (specific to the dialog itself). If you examine the dialog you will see that all its configuration is set on the client-side using client code. Simply the values set in the editor's content area are read by the dialog (once that is it loaded).
@Grant
"...I need to be able to intercept the pasteHtml() or the set_html() and insert these details before the html is written to content area of the editor."
We just answered your support message, but here we will provide additional information as well.
Here is where/how to intercept the pasteHtml method:
http://demos.telerik.com/aspnet-ajax/editor/examples/onclientpastehtml/defaultcs.aspx
As far as set_html is concerned, there is no way to intercept it, but no editor dialog calls set_html - it is you (the developer) that calls this method - so all you need to do is make sure it sets the content you want, the way you want it.
All the best,
Tervel
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0

hacker
Top achievements
Rank 1
answered on 31 Mar 2009, 04:42 PM
In the end, I am going to design my own page and then just add a tool into the toolbar. This way, I can control the page and the code-behind.
Thanks anyway!
Shawn
Thanks anyway!
Shawn