first commit
This commit is contained in:
@ -0,0 +1,84 @@
|
||||
/*
|
||||
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
|
||||
*/
|
||||
|
||||
.cke_tpl_list
|
||||
{
|
||||
border: #dcdcdc 2px solid;
|
||||
background-color: #ffffff;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.cke_tpl_item
|
||||
{
|
||||
margin: 5px;
|
||||
padding: 7px;
|
||||
border: #eeeeee 1px solid;
|
||||
*width: 88%;
|
||||
}
|
||||
|
||||
.cke_tpl_preview
|
||||
{
|
||||
border-collapse: separate;
|
||||
text-indent:0;
|
||||
width: 100%;
|
||||
}
|
||||
.cke_tpl_preview td
|
||||
{
|
||||
padding: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.cke_tpl_preview .cke_tpl_preview_img
|
||||
{
|
||||
width: 100px;
|
||||
}
|
||||
.cke_tpl_preview span
|
||||
{
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.cke_tpl_title
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border: #ff9933 1px solid;
|
||||
background-color: #fffacd;
|
||||
}
|
||||
|
||||
.cke_tpl_list a:hover *,
|
||||
.cke_tpl_list a:focus *,
|
||||
.cke_tpl_list a:active *
|
||||
{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* IE Quirks contextual selectors children will not get :hover transition until
|
||||
the hover style of the link itself contains certain CSS declarations. */
|
||||
.cke_browser_quirks .cke_tpl_list a:active,
|
||||
.cke_browser_quirks .cke_tpl_list a:hover,
|
||||
.cke_browser_quirks .cke_tpl_list a:focus
|
||||
{
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.cke_hc .cke_tpl_list a:hover .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:focus .cke_tpl_item,
|
||||
.cke_hc .cke_tpl_list a:active .cke_tpl_item
|
||||
{
|
||||
border-width: 3px;
|
||||
}
|
||||
|
||||
.cke_tpl_empty, .cke_tpl_loading
|
||||
{
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
|
||||
*/
|
||||
(function(){CKEDITOR.dialog.add("templates",function(c){function r(a,b){var n=CKEDITOR.dom.element.createFromHtml('\x3ca href\x3d"javascript:void(0)" tabIndex\x3d"-1" role\x3d"option" \x3e\x3cdiv class\x3d"cke_tpl_item"\x3e\x3c/div\x3e\x3c/a\x3e'),d='\x3ctable style\x3d"width:350px;" class\x3d"cke_tpl_preview" role\x3d"presentation"\x3e\x3ctr\x3e';a.image&&b&&(d+='\x3ctd class\x3d"cke_tpl_preview_img"\x3e\x3cimg src\x3d"'+CKEDITOR.getUrl(b+a.image)+'"'+(CKEDITOR.env.ie6Compat?' onload\x3d"this.width\x3dthis.width"':
|
||||
"")+' alt\x3d"" title\x3d""\x3e\x3c/td\x3e');d+='\x3ctd style\x3d"white-space:normal;"\x3e\x3cspan class\x3d"cke_tpl_title"\x3e'+a.title+"\x3c/span\x3e\x3cbr/\x3e";a.description&&(d+="\x3cspan\x3e"+a.description+"\x3c/span\x3e");d+="\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e";n.getFirst().setHtml(d);n.on("click",function(){if(a.htmlFile){var b=CKEDITOR.dialog.getCurrent();b.setState(CKEDITOR.DIALOG_STATE_BUSY);CKEDITOR.ajax.loadText(a.htmlFile,function(a){l(a);b.setState(CKEDITOR.DIALOG_STATE_IDLE)})}else l(a.html)});
|
||||
return n}function l(a){var b=CKEDITOR.dialog.getCurrent();b.getValueOf("selectTpl","chkInsertOpt")?(c.fire("saveSnapshot"),c.setData(a,function(){b.hide();var a=c.createRange();a.moveToElementEditStart(c.editable());a.select();setTimeout(function(){c.fire("saveSnapshot")},0)})):(c.insertHtml(a),b.hide())}function k(a){var b=a.data.getTarget(),c=g.equals(b);if(c||g.contains(b)){var d=a.data.getKeystroke(),f=g.getElementsByTag("a"),e;if(f){if(c)e=f.getItem(0);else switch(d){case 40:e=b.getNext();break;
|
||||
case 38:e=b.getPrevious();break;case 13:case 32:b.fire("click")}e&&(e.focus(),a.data.preventDefault())}}}var h=CKEDITOR.plugins.get("templates");CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(h.path+"dialogs/templates.css"));var g,h="cke_tpl_list_label_"+CKEDITOR.tools.getNextNumber(),f=c.lang.templates,p=c.config;return{title:c.lang.templates.title,minWidth:CKEDITOR.env.ie?440:400,minHeight:340,contents:[{id:"selectTpl",label:f.title,elements:[{type:"vbox",padding:5,children:[{id:"chkInsertOpt",
|
||||
type:"checkbox",label:f.insertOption,"default":p.templates_replaceContent},{id:"selectTplText",type:"html",html:"\x3cspan\x3e"+f.selectPromptMsg+"\x3c/span\x3e"},{id:"templatesList",type:"html",focus:!0,html:'\x3cdiv class\x3d"cke_tpl_list" tabIndex\x3d"-1" role\x3d"listbox" aria-labelledby\x3d"'+h+'"\x3e\x3cdiv class\x3d"cke_tpl_loading"\x3e\x3cspan\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3cspan class\x3d"cke_voice_label" id\x3d"'+h+'"\x3e'+f.options+"\x3c/span\x3e"}]}]}],buttons:[CKEDITOR.dialog.cancelButton],
|
||||
onShow:function(){var a=this.getContentElement("selectTpl","templatesList");g=a.getElement();CKEDITOR.loadTemplates(p.templates_files,function(){var b=(p.templates||"default").split(",");if(b.length){var c=g;c.setHtml("");for(var d=0,h=b.length;d<h;d++)for(var e=CKEDITOR.getTemplates(b[d]),l=e.imagesPath,e=e.templates,k=e.length,m=0;m<k;m++){var q=r(e[m],l);q.setAttribute("aria-posinset",m+1);q.setAttribute("aria-setsize",k);c.append(q)}a.focus()}else g.setHtml('\x3cdiv class\x3d"cke_tpl_empty"\x3e\x3cspan\x3e'+
|
||||
f.emptyListMsg+"\x3c/span\x3e\x3c/div\x3e")});this._.element.on("keydown",k)},onHide:function(){this._.element.removeListener("keydown",k)}}})})();
|
@ -0,0 +1,4 @@
|
||||
/*
|
||||
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
|
||||
*/
|
@ -0,0 +1,7 @@
|
||||
/*
|
||||
Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
|
||||
*/
|
||||
CKEDITOR.addTemplates("default",{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath("templates")+"templates/images/"),templates:[{title:"Image and Title",image:"template1.gif",description:"One main image with a title and text that surround the image.",html:'\x3ch3\x3e\x3cimg src\x3d" " alt\x3d"" style\x3d"margin-right: 10px" height\x3d"100" width\x3d"100" align\x3d"left" /\x3eType the title here\x3c/h3\x3e\x3cp\x3eType the text here\x3c/p\x3e'},{title:"Strange Template",image:"template2.gif",description:"A template that defines two columns, each one with a title, and some text.",
|
||||
html:'\x3ctable cellspacing\x3d"0" cellpadding\x3d"0" style\x3d"width:100%" border\x3d"0"\x3e\x3ctr\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 1\x3c/h3\x3e\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd style\x3d"width:50%"\x3e\x3ch3\x3eTitle 2\x3c/h3\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3eText 1\x3c/td\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3eText 2\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eMore text goes here.\x3c/p\x3e'},{title:"Text and Table",image:"template3.gif",description:"A title with some text and a table.",
|
||||
html:'\x3cdiv style\x3d"width: 80%"\x3e\x3ch3\x3eTitle goes here\x3c/h3\x3e\x3ctable style\x3d"width:150px;float: right" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"1"\x3e\x3ccaption style\x3d"border:solid 1px black"\x3e\x3cstrong\x3eTable title\x3c/strong\x3e\x3c/caption\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3ctd\x3e\x26nbsp;\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cp\x3eType the text here\x3c/p\x3e\x3c/div\x3e'}]});
|
Binary file not shown.
After Width: | Height: | Size: 539 B |
Binary file not shown.
After Width: | Height: | Size: 497 B |
Binary file not shown.
After Width: | Height: | Size: 557 B |
Reference in New Issue
Block a user