You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have the latest version of trumbowyg (2.21.0) and I have a bug when I try to change the fontsize of the text, the plugin change the size but if I try to get the value of the textarea I get the text without the new font-size style. But if I do another change after (like new character in the text or bold for exemple, the text get the right style).
For exemple :
If I have a text : Lorem ipsum dolor sit amet
And I change "ipsum" with the "18px" fontsize in the dropdown list.
When I change the fontsize (by 18px), the console return <p>Lorem ipsum dolor sit amet</p>
But if I add a new word after like "Lorem ipsum dolor sit amet test" the console return <p>Lorem <span style="font-size: 18px;">ipsum </span>dolor sit amet</p>
You can try without the event "tbwblur" too, after change de fontsize just enter "console.log($("textarea").val());" in the console you will see that nothing have change.
The bug only append with the "dropdown list / sizeList", but with the "custom" button (allowCustomSize) all is working well.
Thanks for your beautiful plugin, and I hope you will find a solution for this problem.
The text was updated successfully, but these errors were encountered:
There is a fix on the develop branch that I need to tag :)
I will do that soon!
EDIT:
Hum, nope, the bug that you mention is another one in fact... you expect that the textarea is up to date, but is not... again a syncCode seems missing ^^'
Hi,
I have the latest version of trumbowyg (2.21.0) and I have a bug when I try to change the fontsize of the text, the plugin change the size but if I try to get the value of the textarea I get the text without the new font-size style. But if I do another change after (like new character in the text or bold for exemple, the text get the right style).
For exemple :
If I have a text :
Lorem ipsum dolor sit amet
And I change "ipsum" with the "18px" fontsize in the dropdown list.
$("textarea").trumbowyg( { btns: [['strong'], ['fontsize']], plugins: { fontsize: { sizeList: [ '14px', '18px', '22px' ], allowCustomSize: true } } }).on('tbwblur', function() { console.log($("textarea").val()); });
When I change the fontsize (by 18px), the console return
<p>Lorem ipsum dolor sit amet</p>
But if I add a new word after like "Lorem ipsum dolor sit amet test" the console return
<p>Lorem <span style="font-size: 18px;">ipsum </span>dolor sit amet</p>
You can try without the event "tbwblur" too, after change de fontsize just enter "console.log($("textarea").val());" in the console you will see that nothing have change.
The bug only append with the "dropdown list / sizeList", but with the "custom" button (allowCustomSize) all is working well.
Thanks for your beautiful plugin, and I hope you will find a solution for this problem.
The text was updated successfully, but these errors were encountered: