# Create a CDF file with a plot that cannot be edited by double-clicking

I have created a CDF file that contains a Manipulate object with a plot. I intend to embed the file in a web site, so that users can use interactive sliders to change the parameters of the plot.

My problem is that when opening the CDF file in a browser, the user can double-click on the plot and edit it (move lines, move points, etc.). The only interactive content I want in the web site are the sliders produced by Manipulate. How can I create a CDF file that doesn't allow the user to edit the plot?

-
Could you be more specific on the 'buggy behaviour' part? Perhaps you could post a simplified example so that we can investigate it more closely. –  István Zachar Apr 19 '12 at 13:21

Wrap the output of the CDF (the Plot command in your case) into Deploy, or add the Deployed -> True option to your Manipulate.

Using the Deployed option however does not solve all the problems. The documentation states, that Deployed -> True disables:

...general editing and selection in a cell

General editing/selection means that in the following example one can not select individual expressions of the list (e.g. "text"), but still graphics editing is possible, as the screenshot clearly shows:

Manipulate[{"text", Plot[x^n, {x, 0, 3}]}, {n, 0, 10}, Deployed -> True]


Thus to make output really bulletproof, wrap each Graphics object into Deploy as well:

Manipulate[{"text", Deploy@Plot[x^n, {x, 0, 3}]}, {n, 0, 10}, Deployed -> True]

-
Adding the Deploy->True option to Manipulate doesn't lead to the desired result and produces buggy behavior. Wrapping the Plot command with Deploy, however, does exactly what I need - thank you! –  Joe Apr 19 '12 at 12:18
To answer @István-Zachar, the buggy behavior is manifested, for example, in the output of: Manipulate[Plot[x^n,{x,0,3}],{n,0,10},Deployed->True]. Usually when I evaluate this expression, I can edit the result once by double clicking, and only after the first edit it becomes immune to further editing. I say 'usually' because the result is not completely predictable. I'm using version 8.0.4.0. –  Joe Apr 19 '12 at 13:40
@Joe please see my update. I wasn't aware of this situation, though I'm pretty sure that I ran into this before, and that's why now I prefer Deploy over Deployed. –  István Zachar Apr 19 '12 at 14:10
You have answered my question completely, I'm just curious: Why do you use both Deploy and Deployed? What do you achieve by using the Deployed->True option, that is not already achieved by wrapping the Plot function with Deploy? –  Joe Apr 20 '12 at 11:40
@Joe: As you see, the actual output of the Manipulate (that is displayed) is a list: the Deployed option prevents e.g. selecting members of this list, but does not prevent editing Graphics, so the Plot must be wrapped in Deploy. Just try the whole thing withouth the Deployed->True option, and you will see that you can select "text", or different parts of the list. –  István Zachar Apr 20 '12 at 11:44