 |
|
|
 |
 |
|
โอ่ย ตาลายมากมาย ต้องมองแบบ 3 มิติเลย
อยู่ในไฟล์ ckeditor.js ครับ บรรทัดที่ 51 ทั้งหมดครับ
|
 |
 |
 |
 |
Date :
2010-05-20 18:05:44 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อืม...ดูโค้ดแระครับแต่มะรู้แก้ตรงไหน (เพื่อให้เวลาพิมพ์ข้อความลงใน TextArea แล้ว Font มีขนาดเท่ากับ 24 เลยทันที) ผมเลยแนบตัวอย่างโค้ดมาให้ดูกัน ช่วยหน่อยครับ
Code
i.font_defaultLabel='';i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};i.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';i.fontSize_defaultLabel='';i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};j.add('format',{requires:['richcombo','styles'],init:function(l){var m=l.config,n=l.lang.format,o=m.format_tags.split(';'),p={};for(var q=0;q<o.length;q++){var r=o[q];p[r]=new a.style(m['format_'+r]);}l.ui.addRichCombo('Format',{label:n.label,title:n.panelTitle,className:'cke_format',panel:{css:l.skin.editor.css.concat(m.contentsCss),multiSelect:false,attributes:{'aria-label':n.panelTitle}},init:function(){this.startGroup(n.panelTitle);for(var s in p){var t=n['tag_'+s];this.add(s,'<'+s+'>'+t+'</'+s+'>',t);}},onClick:function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);setTimeout(function(){l.fire('saveSnapshot');},0);},onRender:function(){l.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path;for(var v in p){if(p[v].checkActive(u)){if(v!=t)this.setValue(v,l.lang.format['tag_'+v]);return;}}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}});
|
 |
 |
 |
 |
Date :
2010-05-21 14:00:00 |
By :
ratasart |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อืม...ดูโค้ดแระครับแต่มะรู้แก้ตรงไหน (เพื่อให้เวลาพิมพ์ข้อความลงใน TextArea แล้ว Font มีขนาดเท่ากับ 24 เลยทันที) ผมเลยแนบตัวอย่างโค้ดมาให้ดูกัน ช่วยหน่อยครับ
เอาใหม่ครับเพราะอันบนมันดูงงมาก
Code (PHP)
i.font_defaultLabel='';i.font_style={element:'span',styles:{'font-family':'#(family)'},
overrides:[{element:'font',attributes{face:null}}]};i.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;
18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';i.fontSize_defaultLabel='';i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:
[{element:'font',attributes:{size:null}}]};j.add('format',{requires:['richcombo',
'styles'],init:function(l){var m=l.config,n=l.lang.format,o=m.format_tags.split(';'),p={};for(var q=0;q<o.length;q++){var r=o[q];p[r]=new a.style(m['format_'+r]);}l.ui.addRichCombo
('Format',{label:n.label,title:n.panelTitle,className:'cke_format',panel:
{css:l.skin.editor.css.concat(m.contentsCss),multiSelect:false,attributes:
{'aria-label':n.panelTitle}},init:function(){this.startGroup(n.panelTitle);for
(var s in p){var t=n['tag_'+s];this.add(s,'<'+s+'>'+t+'</'+s+'>',t);}},onClick:
function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);setTimeout
(function(){l.fire('saveSnapshot');},0);},onRender:function(){l.on('selectionChange',
function(s){var t=this.getValue(),u=s.data.path;for(var v in p){if(p[v].checkActive(u)){if(v!=t)
this.setValue(v,l.lang.format['tag_'+v]);return;}}this.setValue
('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p=
{element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address=
{element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3=
{element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6=
{element:'h6'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border:
1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand
(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt
(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+
'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');
n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');
n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')
+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)
l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},
checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:
'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:
{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:
{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},
button:{label:m.button.title,command:'button',group:'button'},select:
{label:m.select.title,command:'select',group:'select'},textarea:
{label:m.textarea.title,command:'textarea',group:'textarea'}});
|
 |
 |
 |
 |
Date :
2010-05-21 14:03:55 |
By :
ratasart |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ช่วยกันดูหน่อยครับว่าต้องเพิ่มหรือแก้บรรทัดไหน
|
 |
 |
 |
 |
Date :
2010-05-21 14:04:55 |
By :
ratasart |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตรง '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'
ตอนแรกเวลาพิมพ์มันจะ default อยู่แล้วใช่ม๊า ครานี้ก็ลองเปลี่ยนจาก 8/8px เป็น 24/24px เลยสิ ลองดูนะว่าได้ปะเพราะว่ายังไม่เคยลองเหมือนกัน
|
 |
 |
 |
 |
Date :
2010-05-21 14:44:44 |
By :
Dragons_first |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ส่วนที่คุน อ้นคุง แนะนำมามันเป็นรายการตอนเราเลือกขนาดฟ้อนที่แถบข้างบนครับแต่ค่าดีฟอลไม่ใช่จุดนี้ครับ แต่ผมก็ยังหามะได้เหมือนกัล
|
 |
 |
 |
 |
Date :
2010-05-21 14:54:44 |
By :
ratasart |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอเสริมค่ะ โดยปกติ มันจะเพิ่ม Tag <p></p> ถ้าเราไม่เอา จะแก้ตรงไหนเหรอคะ
|
 |
 |
 |
 |
Date :
2010-05-26 15:43:23 |
By :
naked13 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเพิ่ม enterMode : Number(2) เข้าไปคับ <p></p> จะหายไป
Code (PHP)
CKEDITOR.replace( 'editor1' ,
{
enterMode : Number(2)
});
|
 |
 |
 |
 |
Date :
2010-05-28 18:24:18 |
By :
kerb |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณค่ะ แก้ได้ซักที
|
 |
 |
 |
 |
Date :
2010-05-29 11:00:21 |
By :
naked13 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอถามเพิ่มครับ..แล้วถ้าเราจะกำหนดขนาดอักษรเริ่มต้น และประเภทของฟ้อนต์เริ่มต้น เวลาเริ่มต้นการพิมพ์ข้อมูลจะต้องกำหนดในไฟล์ ckeditor.js หรือเปล่าครับถ้าใช่ไม่ทราบว่าต้องกำหนดหรือเปลี่ยนแปลงส่วนไหนครับ
|
 |
 |
 |
 |
Date :
2010-06-01 10:35:26 |
By :
ratasart |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต้องการ ลบ <p></p> เวลา view ดูตรง html จะต้องปรับ ตรง code ไหนครับ
|
 |
 |
 |
 |
Date :
2014-09-09 14:59:17 |
By :
thong |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|