Closed zengfanfan closed 8 years ago
i do set svgPath before the construtor:
<script src="/static/plugins/jQuery.min.js"></script>
<script src="/static/plugins/trumbowyg/trumbowyg.js"></script>
<script src="/static/plugins/trumbowyg/langs/zh_cn.min.js"></script>
<script>
$(function(){
$.trumbowyg.svgPath = '/static/plugins/trumbowyg/ui/icons.svg';
$('.editor').trumbowyg({
lang:'zh_cn',
btns: [
['strong', 'em', 'underline'], ['link'], ['superscript', 'subscript'],
'btnGrp-justify', 'btnGrp-lists', ['horizontalRule'],
['removeformat'], ['fullscreen'],
],
});
});
</script>
but still no icon shown.
forget about issue 1 (icon) when i specify mime-type to "image/svg+xml" of svg file, it shows well ! fine !!
and issue 2 disapeared too.
no issue left.
but plz think about the advice, what we have to do is "normal steps", take off the npm
I agree; maybe not remove the files in ZIP but put stuff in a REQUIRED directory eg minimal stuff to get it going. For author it is easy but when we go to web page the product looks great but there is no information as to whats needed to make a minimum use installation.
If you follow the home http://alex-d.github.io/Trumbowyg/#get-started
If you have some ideas, you can just do a PR to suggest improvements :)
what i checked is this "https://github.com/Alex-D/Trumbowyg/#getting-started", nmp only. and in the home, it's good. thanks.
the SVG issue is because i use a Http server coded by my own, and yes it's imperfect. i dont know if it's a common issue ...
emm, i've never pull any request on github before, maybe i'll learn howto when i'm free sometime. anyway thanks for your advice.
What's you checked is "Contribute" part of the readme. Maybe a need to be that more clear.
i want a very lightwieght (and fewer features is ok). when i got trumbowyg zip downloaded, i use it as other plugins :
</body>
but after doing this on trumbowyg , it doesnot work. (see end of this text)
it seems i have to use npm and something else blabla, when i install these stuff, it initial so many http(s) requests! i dont know what complex things that i surely dont need was installed in my pc, and i dont want that.
so if this project depends on jquery(and ...), why dont you just include the jquery.min.js, and so as bootstrap or any other dependencies.
PLZ INCLUDE THEM IN THE ZIP or DIST! 'cause if something exists (e.g. jquery), i just simply delete it and refer it from my path.
i mean, IT'S SO HARD TO USE !
issue1: all the icons of the buttons is missed (blank is shown instead). issue2: and the console throw out some error:
chrome version: 51.0.2704.106 m (64-bit) OS: windows 8.1
--- forgive me for the english grammar but i think you can understand what im saying .... :)