panel with buttons doesn't appear
See original GitHub issueIssue Description
How to reproduce the bug?
(a little hard to post full code beacuse i’m using it in an AspNet project with a lot of code, but…)
the scripts are loaded in a bundleConfig via C#:
var bScripts = ObtemScriptBundle("~/FrameworkJS/Plugins");
bundles.Add(bScripts);
bScripts.Include(
"~/base/plugins/jquery/jquery-3.2.1.min.js",
...a hundred more plugins...,
"~/base/plugins/Trumbowyg/trumbowyg.min.js"
);
The same as above is made with .css files. As I said, no errors while loading any of them, also if I use DevTools under the Newtork tab, I can see the loaded plugin of trumbowyg, .js and .css
I don’t know what more code you need, but I’m editng the one i posted down here. (and as I said, even with the basic demo, no custom options or buttons, it didn’t show up the panel)
No errors appear when instantiating an creating elementes with this plugin, but for some reason that I want to discover, the panel with the buttons/options doesn’t show up.
MY HTML
<column largura="*" style="background-color: #eeeeee">
<div class="row">
<div class="col-md-12 rowParent">
</div>
</div>
</column>
My JS used inside VIEWMODEL:
var editorHtmlElement = document.createElement('textarea');
editorHtmlElement.className = "col-md-6";
editorHtmlElement.setAttribute('placeholder', 'placeholder...');
var OptionsTrumbowyg = {};
OptionsTrumbowyg.btns = [
['undo', 'redo'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['formatting'],
['strong', 'em', 'del'],
['link'],
['insertImage'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
];
OptionsTrumbowyg.autogrow = true;
var editorHtmljQuery = $(editorHtmlElement);
editorHtmljQuery.trumbowyg(OptionsTrumbowyg);
$(".rowParent").append(editorHtmlElement);
no panel with buttons appear, even if I try with no custom options just the default… Anyone knows why? (No errors appears when loading page or something like that)
I Also posted a question on stackoverflow, that have some images to describe better what happen. https://stackoverflow.com/questions/47994736/panel-with-buttons-doesnt-appear-on-trumbowyg-plugin
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
My friend, have you read my entire post? it’s there that no errors show up. But anyway, i managed to make it work properly changing the created element from a textarea to a div, and placing the
.trumbowyg()
to the final of all appends and CSS declarations, then it worked properly. I’m testing the resources of the plugin right now, but it seems to be great, thanks!Did you have any error in your browser console?