Ergebnis 1 bis 7 von 7

Thema: microformats in TinyMCE einbinden/erlauben - geht bei mir nicht :-( (Contao 2.11.11)

  1. #1
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.719
    User beschenken
    Wunschliste

    Standard microformats in TinyMCE einbinden/erlauben - geht bei mir nicht :-( (Contao 2.11.11)

    Hi!

    ich wollte in einer Content Box (Text mit TinyMCE) einige Tags mit Microformaten auszeichen...

    per folgender Anleitung https://contao.org/de/manual/3.0/cus...nymce-anpassen

    habe ich in der Tiny-Config folgendes ausgetauscht

    PHP-Code:
    ...
      
    //extended_valid_elements : "q[cite|class|title],article,section,hgroup,figure,figcaption",
      
    extended_valid_elements "@[itemtype|itemscope|itemprop|id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[id|class|name|href|target|title|onclick|rel|style]",

    ... 
    DCA angepasst alle temp-Dateien gelöscht, mich ausgeloggt + neu eingeloggt...

    gebe ich z.B. das im Quelltext ein

    Code:
    <div itemscope itemtype="http://data-vocabulary.org/Organization"> 
        <span itemprop="name">Marios Pizza</span>
        Adresse: 
        <span itemprop="address" itemscope 
          itemtype="http://data-vocabulary.org/Address">
        <span itemprop="street-address">Mariostraße 77</span> in 
          <span itemprop="locality">München</span> in 
        <span itemprop="region">Bayern</span>.
        </span>
        Telefon: <span itemprop="tel">089/000000</span>.
        <a href="http://pizza.example.com" itemprop="url">http://pizza.example.com</a>.
    </div>
    fliegen alle itemscope usw. raus :-(

    was läuft falsch??

  2. #2
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.719
    User beschenken
    Wunschliste

    Standard [erledigt]

    anderes Element - anderes Array...

    $GLOBALS['TL_DCA']['tl_boxes']['fields']['content']['eval']['rte'] = 'tinyCustom';

    ;-)

  3. #3
    Contao-Nutzer
    Registriert seit
    13.06.2010.
    Beiträge
    28

    Standard

    Hallo,

    muss man bei 3.1.4 etwas anders machen?

    Habe deinen Code:
    Code:
    extended_valid_elements : "@[itemtype|itemscope|itemprop|id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[id|class|name|href|target|title|onclick|rel|style]",
    in die tinyCustom kopiert und im DCA den folgenden Eintrag gemacht:

    Code:
    $GLOBALS['TL_DCA']['tl_content']['fields']['text']['eval']['rte'] = 'tinyCustom';
    Er haut mir aber dennoch alle mikroformat-auszeichnungen raus.

    Was mache ich Falsch?
    Grüße
    simkay

  4. #4
    Contao-Urgestein Avatar von zonky
    Registriert seit
    19.03.2010.
    Ort
    Berlin, Rdf
    Beiträge
    9.719
    User beschenken
    Wunschliste

    Standard

    hast Du geprüft, ob auch die "richtige" Tiny-Config geladen wird?

  5. #5
    Contao-Nutzer
    Registriert seit
    13.06.2010.
    Beiträge
    28

    Standard

    habe die tinyCustom mal umbenannt, dann kommt ne Fehlermedlung, daher sollte er eigentlich die richtige einlesen.

    dcaconfig.php
    Code:
    <?php
    $GLOBALS['TL_DCA']['tl_content']['fields']['text']['eval']['rte'] = 'tinyCustom';
    tinyCustom.php
    Code:
    <?php
    
    /**
     * Contao Open Source CMS
     *
     * Copyright (c) 2005-2013 Leo Feyer
     *
     * @package Core
     * @link    https://contao.org
     * @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
     */
    
    
    /**
     * This is the tinyMCE (rich text editor) configuration file. Please visit
     * http://tinymce.moxiecode.com for more information.
     */
    if ($GLOBALS['TL_CONFIG']['useRTE']): ?>
    <script src="<?php echo $this->base; ?>assets/tinymce/tiny_mce_gzip.js"></script>
    <script>
    tinyMCE_GZ.init({
      plugins : "advimage,autosave,directionality,emotions,inlinepopups,paste,save,searchreplace,style,tabfocus,table,template,typolinks,xhtmlxtras",
      themes : "advanced",
      languages : "<?php echo $this->language; ?>",
      disk_cache : false,
      debug : false
    });
    </script>
    <script>
    tinyMCE.init({
      mode : "none",
      height : "300",
      language : "<?php echo $this->language; ?>",
      elements : "<?php echo $this->rteFields; ?>",
      remove_linebreaks : false,
      force_hex_style_colors : true,
      fix_list_elements : true,
      fix_table_elements : true,
      doctype : '<!DOCTYPE html>',
      element_format : 'html',
      document_base_url : "<?php echo $this->base; ?>",
      entities : "160,nbsp,60,lt,62,gt,173,shy",
      cleanup_on_startup : true,
      save_enablewhendirty : true,
      save_on_tinymce_forms : true,
      file_browser_callback : "TinyCallback.fileBrowser",
      init_instance_callback : "TinyCallback.getScrollOffset",
      advimage_update_dimensions_onchange : false,
      template_external_list_url : "<?php echo TL_PATH; ?>/assets/tinymce/plugins/typolinks/typotemplates.php",
      plugins : "advimage,autosave,directionality,emotions,inlinepopups,paste,save,searchreplace,style,tabfocus,table,template,typolinks,xhtmlxtras",
      content_css : "<?php echo TL_PATH; ?>/system/themes/tinymce.css,<?php echo TL_PATH .'/'. $this->uploadPath; ?>/tinymce.css",
      event_elements : "a,div,h1,h2,h3,h4,h5,h6,img,p,span",
      extended_valid_elements : "@[itemtype|itemscope|itemprop|id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[id|class|name|href|target|title|onclick|rel|style]",
      tabfocus_elements : ":prev,:next",
      theme : "advanced",
      theme_advanced_resizing : true,
      theme_advanced_resize_horizontal : false,
      theme_advanced_toolbar_location : "top",
      theme_advanced_toolbar_align : "left",
      theme_advanced_statusbar_location : "bottom",
      theme_advanced_source_editor_width : "700",
      theme_advanced_blockformats : "div,p,address,pre,h1,h2,h3,h4,h5,h6",
      theme_advanced_buttons1 : "newdocument,save,separator,anchor,separator,typolinks,unlink,separator,image,typobox,separator,sub,sup,separator,abbr,separator,styleprops,attribs,separator,search,replace,separator,undo,redo,separator,removeformat,cleanup,separator,code",
      theme_advanced_buttons2 : "formatselect,fontsizeselect,styleselect,separator,bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,indent,outdent,separator,blockquote,separator,forecolor,backcolor",
      theme_advanced_buttons3 : "tablecontrols,separator,template,separator,charmap,emotions,separator,help",
      theme_advanced_font_sizes : "9px,10px,11px,12px,13px,14px,15px,16px,17px,18px,19px,20px,21px,22px,23px,24px"
    });
    </script>
    <?php endif; ?>
    Beide Dateien liegen im config Verzeichnis. Das ganze soll für alle Text-Elemente gelten.
    Geändert von simkay (11.11.2013 um 13:45 Uhr)

  6. #6
    Contao-Nutzer Avatar von mschindler
    Registriert seit
    25.08.2011.
    Ort
    Bad Feilnbach
    Beiträge
    191
    Partner-ID
    7698

    Standard itemtype wird noch nicht berücksichtigt

    Hallo zusammen,
    ich habe mal eine Frage zu der Konfiguration des Tinys ob der bei euch das Attribut itemtype auch übernimmt.
    In dem Beispiel von Google mit der obigen Config wird zwar itemprop im SPAN und itemscope im DIV übernommen, aber itemscope="" bleibt leer.

    HTML-Code:
    <div itemscope itemtype="http://data-vocabulary.org/Organization">      <span itemprop="name">Marios Pizza</span>     Adresse:      <span itemprop="address" itemscope        itemtype="http://data-vocabulary.org/Address">     <span itemprop="street-address">Mariostraße 77</span> in        <span itemprop="locality">München</span> in      <span itemprop="region">Bayern</span>.     </span>     Telefon: <span itemprop="tel">089/000000</span>.     <a href="http://pizza.example.com" itemprop="url">http://pizza.example.com</a>. </div>
    Wie schaut es bei euch aus?

    Viele Grüße

    Markus

  7. #7

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •