Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [JavaScript][HTML]ckeditor ustawienia
Forum PHP.pl > Forum > Przedszkole
ckedit
witam
  1. <script src="./class/ckeditor/ckeditor.js"></script>
  2. <link rel="stylesheet" href="./class/ckeditor/sample.css">
  3. <textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10"></textarea>
  4. CKEDITOR.replace( 'editor1', {
  5. uiColor: '#9AB8F3',
  6. extraPlugins = 'wpro_log',
  7. toolbar = [
  8. { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
  9. { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
  10. { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
  11. { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
  12. '/',
  13. { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
  14. { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
  15. { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
  16. '/',
  17. { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
  18. { name: 'colors', items : [ 'TextColor','BGColor' ] },
  19. { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About','Timestamp'] }
  20. ]
  21. });

i nic nie zmienia.. wyświetla mi domyślny edytor
czemu?
Kshyhoo
A co ma Ci zmieniać?
Po pierwsze, co co ta cała treść w textarea? Usunąłem, bo niepotrzebnie zaśmieca kod. Treść wklejasz w textarea w przeglądarce a nie w kod skryptu.
Po drugie, edytor dołączasz kodem:
w HEAD:
  1. <script src="./class/ckeditor/ckeditor.js"></script>

w BODY:
  1. <textarea cols="80" id="editor1" name="editor1" rows="10"></textarea>
  2. <script type="text/javascript">
  3. //<![CDATA[
  4. CKEDITOR.replace( "editor1",
  5. {
  6. // tu ustawienia
  7. });
  8. //]]>

Byś może to powoduje, że Twój edytor się nie włącza.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.