Hi, I made a CMS following a youtube series and now when I am adding the WSYWIG thing (CKEditor) it is displaying the text as html tags. Here is my code that I am using for displaying the text from the DB. // Query the body section for the proper page $query = mysql_query("SELECT pagebody FROM pages WHERE id='$pageid' LIMIT 1") or die (mysql_error()); while ($row = mysql_fetch_array($query)) { $body = $row["pagebody"]; } mysql_free_result($query); Code (markup): This is what the code looks like in the database: <h1>Welcome to Clashing Clans</h1><br /> <br /> <hr /><br /> <p>This is a site made for YOU to easily advertise your clans by making pages for them that everyone can view.</p><br /> <br /> <p>There are many other things on this site as well.</p><br /> <br /> <hr /><br /> <p>Thank You,</p><br /> <br /> <div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">Shivam Paw</div><br /> <br /> <div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">Site Admin</div><br /> <br /> <p>&nbsp;</p><br /> <br /> <p>&nbsp;</p><br /> <br /> <p>&nbsp;</p><br /> Code (markup): Thank You, Shiv
Thanks it worked! Now though, one break line in the editor is a massive space when displayed. Any ideas? Also when creating/editing a page the images overflow the editor and require scrolling so is there anyway I can make that so it fits the editor? Thanks!
Are you adding the <br /> at some point? I am just wondering since <br /> is the only thing not encoded. You do not need the <br /> as you already have the <p> tags to create the newline. <p> with <br /> makes double lines. Haven't worked with ckeditor for a while, but you can have a JS code that resizes them to fit the screen. Alternatively if they are in a container, you can make them sized relative to the container.