Render TinyMCE Editor in custom widget popup

Render TinyMCE Editor in custom widget popup

This question is answered

Hi,

I need to render TinyMCE editor in my custom widget in the pop-up modal dialogue. But When I am calling $core_v2_editor.Render() method in the pop-up getting an error as mentioned below:

Invocation of method 'Render' in  Telligent.Evolution.VelocityExtensions.

Editor threw exception System.Web.HttpException : Response is not available in this context.

This works fine if I am calling it on widget HTML instead of pop-up.

Can anybody please suggest what can be the possible reasons for this issue.

Thanks.

Verified Answer
  • I'm assuming the pop up modal in the widget is being implemented as an executed callback using $core_v2_widget.GetExecutedFileUrl().

    I can recreate an error with usage of $core_v2_editor within an executed callbacks, and I am logging a bug internally to address this.  The cause seems to be related to the fact that it currently relies on the HttpContext's response, which no longer exists at the time of the request against the callback.

    Unfortunately, there is not a an easy workaround at this time other than potentially implementing your own modal solution instead that doesn't rely on an iframe pointing at an executed velocity callback.  It could be rendered inline in the widget, hidden by default, and displayed via CSS/JS instead.

All Replies
  • I'm assuming the pop up modal in the widget is being implemented as an executed callback using $core_v2_widget.GetExecutedFileUrl().

    I can recreate an error with usage of $core_v2_editor within an executed callbacks, and I am logging a bug internally to address this.  The cause seems to be related to the fact that it currently relies on the HttpContext's response, which no longer exists at the time of the request against the callback.

    Unfortunately, there is not a an easy workaround at this time other than potentially implementing your own modal solution instead that doesn't rely on an iframe pointing at an executed velocity callback.  It could be rendered inline in the widget, hidden by default, and displayed via CSS/JS instead.

  • Hello  Michael,

    Are there any fixes for this issue in the Telligent Community Version 7.1? As I have recently upgraded the Telligent to 7.1 and still facing the same issue.

    Please suggest.

    Thanks.