Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,483 members, 7,823,118 topics. Date: Friday, 10 May 2024 at 02:28 AM

HELP: I Need WYSIWYG INTEGRATED INTO A CMS - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / HELP: I Need WYSIWYG INTEGRATED INTO A CMS (1436 Views)

What PHP Cms/framework Do You Use And Why? / Framework Or A CMS For An E-commerce Website? / How To Build A CMS! Freedom From Wordpress.. (2) (3) (4)

(1) (Reply) (Go Down)

HELP: I Need WYSIWYG INTEGRATED INTO A CMS by cyan2008(m): 1:03pm On Jan 26, 2016
[font=Lucida Sans Unicode][/font]can someone help with this.

I want to integrate an html text editor (WYSIWYG) into my database
such that once i insert/edit it and echo it out on a page,
the format (paragraphs, indentation, headings, etc) is retained. Just like you have in most CMS framework.

i have been able to insert into the database using Tinymce, but when i display record from the database, it looses the format and renders the text string as one lenghty record.

I used css to format the output page, but nothing seems to be working.

Any Idea will be appreciate.

Thanks
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by orlaryhincah(m): 1:12pm On Jan 26, 2016
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by spikesC(m): 6:35pm On Jan 26, 2016
I use TinyMCE and it works just fine. Maybe you're encoding the html output (as you should for XSS attacks)
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by cyan2008(m): 3:04pm On Jan 27, 2016
spikesC:
I use TinyMCE and it works just fine. Maybe you're encoding the html output (as you should for XSS attacks)

Thanks so much for the reply.
What i did was to submited the formatted text in mysql database,
create Master page which displays a link such that when someone
clicks the link, the entire record is printed in the Detail page.

Database ------> Master Page.php(contains links to be clicked) ------->Detail page.php (displays links to be clicked).


It put relevant css/style in Detail page.php so that it formats the text as it is echoed on the page. It has not worked yet.

Any more practical help is much appreciated. Thanks.
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by spikesC(m): 3:13pm On Jan 27, 2016
cyan2008:


Thanks so much for the reply.
What i did was to submited the formatted text in mysql database,
create Master page which displays a link such that when someone
clicks the link, the entire record is printed in the Detail page.

Database ------> Master Page.php(contains links to be clicked) ------->Detail page.php (displays links to be clicked).


It put relevant css/style in Detail page.php so that it formats the text as it is echoed on the page. It has not worked yet.

Any more practical help is much appreciated. Thanks.

A code snippet would do. Use pastebin

Regardless, view the row in phpmyadmin and see if the full html is saved in the database. That would help you in debugging (to know if your problem is stripping tags before save or stripping tags before display
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by cyan2008(m): 6:25pm On Jan 27, 2016
Thanks, i would check that up to see if it works. However thanks for your helpfulness.
appreciations! I will tell you when i have done that

You mentioned pastebin.I have gone there to see what it is all about, but i look confused since i have not used the site before,
how do i find my way in this regard? which link solves my problem?

Best regards
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by Nobody: 6:39pm On Jan 27, 2016
Since i cannot see any code, i cannot start speaking at random.
@op, submit a copy of the code used to insert record into the database and a snippet for retrieving it.
I will assume the following:
1. That you are using a field such as text, longtext or something bigger as the field to save the html into the database (and not varchar)
2. That you are aware that tinymce and the other wysiwyg editors do not 'really allow' (means you will invariably run into problem) internal stylesheets like that no matter the config you follow (and believe me when i tell you that i know all the possible configs in that direction).
3. That you know that tinymce can however allow custom class-name attributes in codeview for the elements.
4. That tinymce allows you to use a single stylesheet for the editor contents where you can define the classes used.
Phew, i will rest for now.
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by Nobody: 3:35am On Jan 29, 2016
ok now. what you need to create a files on php, CSS. JavaScript.
I will suggest. you do something like this..
<head> < script> function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData ("text", ev.target.id); } function drop(ev) { ev.preventDefault(); var data = ev.dataTransfer.getData ("text"wink; ev.target.appendChild (document.getElementById (data)); } < /script > < /head > < body > < div id= "div1" ondrop= "drop(event)" ondragover= "allowDrop (event)" >< /div > < img id= "drag1" src= "img_logo.gif" draggable= "true" ondragstart= "drag(event)" width= "336" height= "69" > < /body > < /html >
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by cyan2008(m): 3:40pm On Jan 29, 2016
O thanks let me check that up
Re: HELP: I Need WYSIWYG INTEGRATED INTO A CMS by ekenetheorg(m): 7:40pm On Jan 30, 2016
Use Froala and you'd be glad you did

(1) (Reply)

FREE WEB HOSTING: This One Is Amazing, No Limits No Suspension, No Downtime / I Built A Chatbot For Cinema Lovers, Please Check It Out / Eliminate Render-blocking Javascript And CSS In Above-the-fold Content

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.