GithubHelp home page GithubHelp logo

Comments (7)

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by Waxolunist
Monday May 05, 2014 at 14:40 GMT


The problem might be, that u are using textarea, which in fact will render as sandboxed iframe, which makes everything a lot more difficult.
Try using the latest 0.3 version and initialize the editor with a div. This should get u started.

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by vasikgreif
Thursday May 08, 2014 at 15:06 GMT


Can you give me an example how to do this? I treid to call it on div the same way as on textarea, but that doesn't create anything..

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by Waxolunist
Friday May 09, 2014 at 14:49 GMT


There are some examples in the repo:

https://github.com/Waxolunist/bootstrap3-wysihtml5-bower/blob/v0.3.0-wip/index-multi-dev.html
https://github.com/Waxolunist/bootstrap3-wysihtml5-bower/blob/v0.3.0-wip/examples/index-require.html

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by vasikgreif
Saturday May 10, 2014 at 09:32 GMT


Thanks, got the wysivig displayed. Now, how can I get it's value inside a form? When I initialized it on textarea, I gave it simply a name. How is that done with a div?

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by Waxolunist
Saturday May 10, 2014 at 18:26 GMT


Yes, beside its advantages to have a div, there are clear disadvantages, like the submit.

See here: http://stackoverflow.com/questions/6247702/using-html5-how-do-i-use-contenteditable-fields-in-a-form-submission

You can search google for other solutions: https://www.google.com/search?q=contenteditable+form+submit

The reason why it worked before was, that the content of the iframe is syncronized with the textarea, which is hidden on init. So probably you can do the same strategy.

Because most of the work regarding the editor itself is done in the editor component, maybe you find something helping you in the editors repo: https://github.com/Edicy/wysihtml5/

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by vasikgreif
Saturday May 10, 2014 at 19:40 GMT


Thanks, I ended up using simple:

 $('.textarea').each(function() {
                var target = $(this).attr('data-target');
                $(target).val($(this).html()) ;
            });

in the form submit callback.

from bootstrap3-wysiwyg.

Waxolunist avatar Waxolunist commented on June 4, 2024

Comment by Waxolunist
Monday May 12, 2014 at 21:38 GMT


Glad, I could help. I'll close for now.

from bootstrap3-wysiwyg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.