Is it possible to insert php in content via TinyMCE?

Hi all

Not sure if this is possible. Scenario, I have five predefined code snippets in seperate files for inserting a random image with a specific height. e.g. I have randomimage250.php with relevant php code in it to show a random image with a style class set to limit height to 250px.

Now I want to be able to say to the user to click on X, or paste in Y to place a desired random image (from one of the 5 predefined sizes) into their content at any point and be able to float left, right etc. I know I can create a user button in MCE but that did not work and also pasting it in within the HTML code (via TinyMCE) does not work either as the php code is simply removed by the script from what I can tell.

Now I know how to set a php include and if I place it in the codeblock it works, but I want to be able to let the user place that random image code where they want.

Any ideas? Or probably a better way to do what I am asking?

Cheers

Comments

  • acrylian Administrator, Developer
    That is not possible with TinyMCE and it is not meant for this. I have a far memory that there was once a plugin. Last time I tried it did not work. Anyway, recommend the TinyMCE site, forum and wiki itself for these kind of specific things.

    Regarding the codeblocks: They are meant for that purpose actually. You know there is tinyzenpage for inserting images? Of course that does not insert code but links and no random images (which would not be random once inserted).
Sign In or Register to comment.