steveathon / bootstrap-wysiwyg

Tiny bootstrap-compatible WYSIWYG rich text editor
MIT License
661 stars 1.71k forks source link

Tollbar not showing #120

Closed jonatasdaniel closed 7 years ago

jonatasdaniel commented 7 years ago

Hi guys, it's my first time using bootstrap-wysiwyg (which document is very poor, btw) and I'm trying to to this:

<div id="editor"></div>

$('#editor').wysiwyg();

but toolbar is not there. js and css files are included.

It's anything wrong? It's my first time using it, and I didn't find any solutions in your documentation.

Thanks for now.

codewithtyler commented 7 years ago

Good evening, this bootstrap-wysiwyg project is not like some of the other wysiwyg editors you may have seen. Some of the other editors have a toolbar built in to their js/css files. In order to keep the library small we only ship the code that creates the editor itself. You have to create your own toolbar using the documentation provided.

FYI, the documentation does mention this:

Optionally, also create a toolbar (see the source of this page for an example):

<div class="btn-toolbar" data-role="editor-toolbar"
        data-target="#editor">
</div>

In the toolbar, execute simple commands by adding a data-edit attribute to a link.

<a data-edit="bold">...</a>

and yes the documentation could be worded better I just haven't had the time to do it. You're welcome to contribute a PR.

jonatasdaniel commented 7 years ago

Ok sorry, I thought it was like the others editors. Thanks!

codewithtyler commented 7 years ago

Were you able to get your toolbar to show up?

NotAClue commented 7 years ago

I'm working on it on my system it just seems to be a bootstrap formatting issue, what version of Bootstrap is it running under in the samples?

codewithtyler commented 7 years ago

@NotAClue I'm not sure I follow. What formatting issue are you referring to? The examples use version Bootstrap 3.3.5.

NotAClue commented 7 years ago

I'll go back to your examples again thanks