Hi everyone.
I am facing a problem with tinyMCE.
I am giving a functionality on admin side of my website, where admin can edit the content of pages. I have provided them with the tinyMCE for that purpose.
Suppose they are editing Page 'page1'.
They will provide its content in tinyMCE, and save it.
When somebody is visiting that Page 'page1' all I am doing is:
<html>
<head>.........</head>
<body>
.......
<div class='page_content'>
<?php echo $page1->getContent(); ?>
</div>
......
</body>
</html>
Everything is working fine.
Now, tinyMCE provide a feature where you tell which css will it use. You set the required css to the 'content_css' property of tinyMCE init function.
I did that, I provided the css which I was using to style my Page Content.
Now, my problem is this:::::::::
Content of my page is in div.page_content. But in tinyMCE, the content of this page is not in any other thing (any div.page_content ). So the style which tinyMCE is applying to my content, while I am editing it, is not visually effective.
The only way, which I can think of resolving this problem is, by telling tinyMCE to add
<div class='page_content'>
at the top. And then when admin will submit the data, I will just strip this extra div.
::::::::::::::::::::::::::::::::::
Any suggestions?