1
tinymce의 FAQ explainscontent_css
파일을 참조하여 편집기의 기본값을 글꼴 스타일로 변경하는 방법.비행 중 tinymce 편집기 글꼴 스타일 및 크기를 변경하는 방법은 무엇입니까?
하지만 프로그래밍 방식으로 편집기의 글꼴 스타일을 변경하고 싶습니다. 어떤 아이디어? 감사.
tinymce의 FAQ explainscontent_css
파일을 참조하여 편집기의 기본값을 글꼴 스타일로 변경하는 방법.비행 중 tinymce 편집기 글꼴 스타일 및 크기를 변경하는 방법은 무엇입니까?
하지만 프로그래밍 방식으로 편집기의 글꼴 스타일을 변경하고 싶습니다. 어떤 아이디어? 감사.
이것은 가능하지만 이에 대한 지식이 필요합니다. switchStyle이
// url is the url to the stylesheet file to be added to the editor iframes head
// ed is the editor object or editor id
switchStyle: function(url, ed) {
if (typeof ed != 'object') {
ed = tinymce.get(ed);
}
//replace the custom content_css if set
var url_to_replace = ed.getParam('content_css');
var doc = ed.getDoc();
var $doc = $(doc);
var sheets_urls = [];
if (url_to_replace){
sheets_urls.push(url_to_replace);
}
// remove all stylesheets from sheets_urls
$doc.find('link').each(function() {
if (tinymce.inArray(sheets_urls, $(this).attr('href').split('?')[0]) !== -1) {
$(this).remove();
}
});
var link = doc.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = url;
// setstylesheet
$doc.find('head:first').append(link);
},
입니다
당신은
self.switchStyle(url, ed);
처럼 뭔가를 호출해야합니다