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
Create new button "button-ifontsize" following steps defined here. and on click call "handleClick" function.
handleClick: function() {
let editor = this.props.editor.get("nativeEditor");
let parentNode= document.getSelection().extentNode.parentNode;
let fontSizePX= window.getComputedStyle(parentNode, null).getPropertyValue('font-size');
let nfontSize= parseInt(fontSizePX);
nfontSize = nfontSize + 1;
value = nfontSize +'px';
var vars= {};
vars["size"]= value;
CKEDITOR.config.fontSize_style= {
element: 'span',
styles: { 'font-size': '#(size)' },
overrides: [ {
element: 'font', attributes: { 'size': null }
} ]
};
let styles={};
styles= new CKEDITOR.style( CKEDITOR.config.fontSize_style, vars );
editor.applyStyle( styles );
editor.fire("actionPerformed",this);
},
getDefaultProps: function() {
return {
style: {
styles: {
'font-size': '#(size)' },
}
};
},
statics: {
key: 'ifontsize'
},
Add 'FontSize', 'ifontsize' as new text selection buttons.(FontSize in font plugin)
Create a div placeholder <div class="ae-placeholder" contenteditable="true" data-placeholder="Write here the description" id="description"></div> in html file.
Enter sample text.
Select text. Toolbar is rendered.
Select size from FontSize drop down. Size is applied
Increment font size using "ifontsize" button.
Expected result
Size is applied and FontSize drop down value also changes.
Actual result
Size is applied but FontSize drop down value doesn't change.
This only happens when toolbar is rendered first time. Any selection after that changes the FontSize dropdown value with similar steps.
The text was updated successfully, but these errors were encountered:
Steps
<div class="ae-placeholder" contenteditable="true" data-placeholder="Write here the description" id="description"></div>
in html file.Expected result
Size is applied and FontSize drop down value also changes.
Actual result
Size is applied but FontSize drop down value doesn't change.
This only happens when toolbar is rendered first time. Any selection after that changes the FontSize dropdown value with similar steps.
The text was updated successfully, but these errors were encountered: