我想在下拉菜单中使用Link和Unlink作为选项,并使用预定义的颜色(蓝色)。以至于所有超链接文本都会有蓝色。谁知道怎么做?
请参阅下面的代码,我在block_format中添加了链接,以便在下拉列表中看到工作“链接”,但是当有人点击“链接”项时,如何设置默认颜色并打开链接对话框? / p>
tinymce.init({
selector: "textarea#" + id,
theme : "modern",
width: 660,
height: 280,
menubar: false,
statusbar: false,
plugins: "paste,link,textcolor",
block_formats: "Paragraph=p;Header 1=h1;Header 2=h2;Header 3=h3; link",
toolbar: [
"formatselect forecolor | undo redo | link unlink",
"bold italic underline | bullist numlist | alignleft aligncenter alignright alignjustify"
],
setup: function(editor) {
editor.on('init', function(e){
tinymce.get(id).setContent($scope.params.content);
});
editor.on('change',function(e){
$scope.params.content = escapeIllegalCharacters(tinymce.get(id).getContent());
});
}
});