Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIAccessing TextEditor from callbackAccessing TextEditor from callback
Previous
 
Next
New Post
10/30/2007 6:56 AM
 

I've found this post helpful

i'm essentially trying to access the entered html from a TextEditor dnn control (like freetextbox or FCKEditor). I cant locate its content thru request.form (probably due to the fact that the editor's content is generated in an iFrame).

Due to the complexity of this type of control, is grabbing its value in a callback impossible?

 
New Post
10/30/2007 11:21 AM
 

This question really is about interacting with the editor from the client side using its object model.  Each editor will have its own interfaces to grab the text.  For example, FCKEditorAPI

Once you have the HTML, the callback logic could be used just like normal.


 
New Post
10/30/2007 12:29 PM
 

The only work around i found was to implement each independent text editors JavaScript API

So i got references from the major text editors:

  • http://wiki.fckeditor.net/Developer's_Guide/Javascript_API
  • http://cutesoft.net/developer+guide/javascript-api.htm
  • http://freetextbox.com/demos/javascript.aspx
  • http://www.telerik.com/help/radeditor/5.6/?r.a.d.editor%20Client-Side%20Events.html

And the JS looks something like this:

function storeDescFCK(ctx)
{
    var oEditor = FCKeditorAPI.GetInstance(ctx + '_txtDescription_txtDescription');
    dnn.setVar('Desc', oEditor.GetHTML());
}
function storeDescFTB(ctx)
{
    dnn.setVar('Desc', FTB_API[ctx + '_txtDescription'].GetHtml());
}
function storeDescCute(ctx)
{
    var oEditor = document.getElementById(ctx + '_txtDescription');
    dnn.setVar('Desc', oEditor.getHTML());
}
function storeDescRad(ctx)
{
    var oEditor = GetRadEditor(ctx + '_txtDescription');
    dnn.setVar('Desc', oEditor.GetHtml());
}

And i do a dual js call on the onclick event (one is to implement on of these functions, the other is the callback. These two are separated by a ;  ... ie:    d be better if i didnt have to dig this deep. Any suggestions?

 
New Post
10/30/2007 12:32 PM
 

i guess i was hoping (from a module ISV point of view) that i could have a solution which wouldnt require digging that deep.

Aside from the editors mentioned, any major ones i'm missing? I guess i could have a check to see if the portal doesnt have a supported text editor and display a plain textbox instead.

hmmm...

 
New Post
10/30/2007 5:47 PM
 

Sorry I haven't looked that closely at the text editor situation.

Sounds like you are having to implement something similar to what I did in the ClientAPI with the XMLHTTP object, where in IE I use an ActiveX control, in FireFox/Mozilla I use another object, and in Opera/Safari, I coded it completely in javascript.   Basically I created a standard interface that wrapped each implementation so that the calling code doesn't care.  I'm guessing you may want to do something similar so you can protect yourself from future changes or new implementations.


 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIAccessing TextEditor from callbackAccessing TextEditor from callback


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out