简体   繁体   English

如何更改字体大小以在ckeditor中显示

[英]How to get change in font size to show in ckeditor

So the code that I currently have is meant for a user to paste text into the ckeditor, and then when they click submit, it will identify certain characters and change their font sizes. 因此,我当前拥有的代码供用户将文本粘贴到ckeditor中,然后当他们单击“提交”时,它将识别某些字符并更改其字体大小。 This works when the text is shown outside of ckeditor when in a normal textarea, but the changes in font size are not shown inside the ckeditor. 当在正常文本区域中在ckeditor外部显示文本时,此功能有效,但在ckeditor内部未显示字体大小的更改。 How can I get the ckeditor to recognize the change in fonts and font sizes? 如何让ckeditor识别字体和字体大小的变化? Here is my code: 这是我的代码:

<script src="//cdn.ckeditor.com/4.6.2/full/ckeditor.js"></script>      
</head>      
<body>         
<form onsubmit="event.preventDefault(); filterTextArea();">  
<div name="space" id="space"> </div>         
<textarea name="editor1" id="editor1" rows="10" cols="80" >     </textarea>           <br>    
<div id="formbox">  <button action="submit" id = "submit" >WORDIPLY</button>        </div>              
<script>      

CKEDITOR.replace( 'editor1', {
customConfig: 'www.wordiply.weebly.com/files/theme/ckeditor.js'
});      
</script>      
</body>        
<body>                        
<script>

function filterTextArea(){    
editor = CKEDITOR.instances.editor1;     
var edata = editor.getData(); 

//CHANGE FONT OF CHARACTERS  

editor.setData(data);    
}    

var config = {};  
config.placeholder = 'some value';   
CKEDITOR.replace("myeditor" , config, {
});     

我认为您可能正在寻找以下插件: http : //ckeditor.com/addon/font

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM