0

I am using Tinymce editor. In it there is an option for Paste from word. On the click action of it, it calls a function windowmanager.open

My objective is to display the existing content of the editor in the popup window.

I am passing the content using query string, but sometimes the content is too large and i get URI limit exceed error.

Please help me on how to pass the content to the view file.

var actualContent = ed.getBody().innerHTML;
ed.windowManager.open({
                                file : url + '/pasteword.php?preContent='+encodeURIComponent(actualContent),
                                width : 450,
                                height : 400,
                                inline : 1
                            }, {
                                plugin_url : url
                            });
Abhishek Sanghvi
  • 4,582
  • 6
  • 28
  • 36

1 Answers1

0

Blatantly stiolen from the answers to this question

The HTTP protocol does not place any a priori limit on the length of a URI. Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15). Note: Servers should be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations may not properly support these lengths.

What to note is this line:

A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle

So there doesnt really seem to be any easy way for you to pass such a large string as you're trying to do, unless you have access to configuring the server and that it is possible to do such a configuration.

Community
  • 1
  • 1
Daniel Figueroa
  • 10,348
  • 5
  • 44
  • 66