WYSIWYG Editor not saving proper data

i am using wysiwyg editor
(https://github.com/schnawel007/bootstrap3-wysihtml5) within form, but
when
submitting the form the data with the html tags is not saved rather
saving
the data in plain text, also searched google but not getting any
possible
solution

On Mon, Apr 28, 2014 at 5:35 AM, Joy G. [email protected]
wrote:

i am using wysiwyg editor
(https://github.com/schnawel007/bootstrap3-wysihtml5) within form, but when
submitting the form the data with the html tags is not saved

The editor doesn’t “save” anything - your code does.

Does the form submission event in your logs show the html? Then
the editor has done its job.

What do you see when you examine the saved data in the db?


Hassan S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

Hi buddy!

Thanks a lot for replying.

But the parameters in the log also not showing the html and it is

Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“P7fHbeUQlcCaV3MK2g+Qu6h/CmhM8+g6SOHzqjEuoPI=”,
“request”=>{“title”=>“Title”, “date”=>“2014/4/30”, “time”=>“4:15 PM”,
“desc”=>“Bold”}, “_wysihtml5_mode”=>“1”, “commit”=>“Add Request”}

When i examine the saved data in db it is just plain text.

On 28 April 2014 16:32, Joy G. [email protected] wrote:

When i examine the saved data in db it is just plain text.

Do you mean the html tags appear in the data, but as text rather than
being interpreted as html, or the html tags are not there at all, but
the text you entered is there? Just to make sure there is no
understanding you could copy one of the records here.

Colin

Hassan S.:

*The field “desc” *should contain “Bold” rather than
“desc”=>“Bold”.
I have checked the markup and javascript but there is no problem.

Colin L.:

There is no html tag at all only the plain text.

On Mon, Apr 28, 2014 at 8:32 AM, Joy G. [email protected]
wrote:

Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“P7fHbeUQlcCaV3MK2g+Qu6h/CmhM8+g6SOHzqjEuoPI=”,
“request”=>{“title”=>“Title”, “date”=>“2014/4/30”, “time”=>“4:15 PM”,
“desc”=>“Bold”}, “_wysihtml5_mode”=>“1”, “commit”=>“Add Request”}

What field is supposed to have markup in it?

In any case, if markup is not being submitted as you expect, you’ll
need to make sure your page markup is valid, there’s no JavaScript
errors, and the configuration for this plugin is correct, assuming there
is some (I’ve never used it).

Worst case I’d create a minimal test project to see if you could get it
to work at all. If that doesn’t work, send the link to it.


Hassan S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

On Apr 29, 2014, at 1:39 PM, Joy G. [email protected]
wrote:

The field “desc” should contain “Bold” rather than “desc”=>“Bold”. I have
checked the markup and javascript but there is no problem.

If it’s not being submitted to the server, then there is a problem with
the markup or javascript. Quickest thing to do is use your browser
debugging tools to see what the browser is actually sending to the
server. Then you’ll at least know whether the tags are stripped in the
browser or the server.


Scott R.
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice

Hi guys .

We need check datatype we mention when create database for this field
,
we require datatype for field is text , then data will save in our
database.

On May 7, 2014, at 8:02 AM, Pratap P. [email protected] wrote:

We need check datatype we mention when create database for this field , we
require datatype for field is text , then data will save in our database.

???

If the correct data is not being submitted by the browser to the client,
then it’s not going to matter what the data type in the database is.
(And of course it should be text, what other option is there.)

Until you determine what data the client is actually submitting to the
server, you’re just running around in circles wasting your time (and
ours a bit too).


Scott R.
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice

On Tue, Apr 29, 2014 at 12:39 PM, Joy G.
[email protected] wrote:

The field “desc” should contain “Bold” rather than “desc”=>“Bold”. I
have checked the markup and javascript but there is no problem.

I just set up a quick testbed to try this editor, and my opinion is that
it doesn’t work, period – formatted text is created in the browser but
not sent to the server on submit.

Bummer because it does have an attractive UI, but I just don’t have
the time today to debug the problem.

Definitely not a Rails issue, though.


Hassan S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs