[TYPO3-UG Italy] Allineare le tabelle nell'RTE

Elena Bartolotti elena-typo3 at intera.it
Fri Dec 30 16:59:34 CET 2011


Andata!
Grazie!

Il 30/12/2011 15:01, Federico Bernardin ha scritto:
> Ciao, dimenticavo,
> prova a mettere questo nel typoscript template:
>
> lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib>
>
> Ciao
> federico
>
> Il giorno 30/dic/2011, alle ore 14:43, Elena Bartolotti ha scritto:
>
>> Grazie mille Federico!
>> Per provare ho fatto un brutale copia/incolla del tuo codice e non mi funziona.
>> Ho poi provato a selezionarmi solo ciò che mi serve, ovvero
>>
>> RTE.default {
>>     contentCSS = fileadmin/template/css/rte.css
>>     classesTable = table_left, table_center
>>     proc.overruleMode = ts_css
>> }
>>
>> ## Use same RTE processing rules in FE
>> RTE.default.FE.proc<  RTE.default.proc
>>
>> ## RTE processing rules for bodytext column of tt_content table
>> ## Erase settings from other extensions
>> RTE.config.tt_content.bodytext>
>>
>> ## Make sure we use ts_css transformation
>> RTE.config.tt_content.bodytext.proc.overruleMode = ts_css
>> RTE.config.tt_content.bodytext.types.text.proc.overruleMode = ts_css
>> RTE.config.tt_content.bodytext.types.textpic.proc.overruleMode = ts_css
>>
>> In questo modo mi mette le classi selezionabili nel dropbox della tabella nell'rte, ma poi non mi lascia il parametro class vuoto nel tag table, così<table class="">
>> Che mi sono persa per strada?
>>
>>
>> Il 30/12/2011 11:33, Federico Bernardin ha scritto:
>>> Ciao Elena ti allego un esempio di TSConfig che uso normalmente:
>>>
>>>
>>> #-----------------------------------
>>> # RTE Configuration
>>> #-----------------------------------
>>>
>>> RTE.default {
>>>
>>>      ## Custom client CSS for same behavoir in BE and FE
>>>      contentCSS = fileadmin/templates/media/css/rte.css
>>>      classesTable = borderBlue,borderBlack,transparent
>>>      hideTableOperationsInToolbar = 1
>>>      buttons.toggleborders.keepInToolbar = 1
>>>      hideButtons =
>>>      FE.hideButtons =
>>>      showButtons (
>>>      blockstylelabel, blockstyle, textstylelabel, textstyle, fontstyle, fontsize, formatblock, bold, italic, underline, strikethrough, subscript, superscript, lefttoright, righttoleft, left, center, right, justifyfull, orderedlist, unorderedlist, outdent, indent, textcolor, bgcolor, textindicator, emoticon, insertcharacter, line, link, image, table, user, acronym, findreplace, spellcheck, chMode, inserttag, removeformat, copy, cut, paste, undo, redo, showhelp, about, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
>>>      )
>>>
>>>     proc {
>>> 	## CSS Styled Content is used.
>>> 	overruleMode = ts_css
>>>
>>> 	## Do not convert br to p
>>> 	dontConvBRtoParagraph = 1
>>>
>>> 	## Remap div to p
>>> 	remapParagraphTag = p
>>>
>>> 	## Tag which are allowed outside the p and div
>>> 	allowTagsOutside = hr, address
>>>
>>> 	## TAGS ALLOWED
>>> 	## Added to the default internal list: b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span
>>> 	## But, for the sake of clarity, we use a complete list in alphabetic order.
>>> 	## center, font, strike, sdfield and  u will be removed on entry (see below).
>>> 	## b and i will be remapped on exit (see below).
>>> 	## Note that the link accessibility feature of htmlArea RTE does insert img tags.
>>> 	allowTags (
>>> 		a, abbr, acronym, address, blockquote, b, br, caption, cite, code, div, em,
>>> 		h1, h2, h3, h4, h5, h6, hr, i, img, li, link, ol, p, pre, q, sdfield,
>>> 		span, strong, sub, sup, table, tbody, td, th, tr, tt, ul
>>> 	)
>>>
>>> 	## TAGS DENIED
>>> 	## Make sure we can set rules on any tag listed in allowTags.
>>> 	denyTags>
>>>
>>> 	## ALLOWED P&   DIV ATTRIBUTES
>>> 	## Attributes class and align are always preserved
>>> 	## Align attribute will be unset on entry (see below)
>>> 	## This is a list of additional attributes to keep
>>> 	keepPDIVattribs = xml:lang
>>>
>>> 	## CONTENT TO DATABASE
>>> 	entryHTMLparser_db = 1
>>> 	entryHTMLparser_db {
>>> 		## TAGS ALLOWED
>>> 		## Always use the same list of allowed tags.
>>> 		allowTags<   RTE.default.proc.allowTags
>>>
>>> 		## TAGS DENIED
>>> 		## Make sure we can set rules on any tag listed in allowTags.
>>> 		denyTags>
>>>
>>> 		## AVOID CONTENT BEING HSC'ed TWICE
>>> 		htmlSpecialChars = 0
>>>
>>> 		tags {
>>> 			## REMOVE IMG TAGS
>>> 			# img.allowedAttribs = 0
>>> 			# img.rmTagIfNoAttrib = 1
>>>
>>> 			## REMOVE SPAN TAGS
>>> 			#span.allowedAttribs = 1
>>> 			#span.rmTagIfNoAttrib = 1
>>>
>>> 			## CLEAN ATTRIBUTES ON THE FOLLOWING TAGS
>>> 			## Span fixAttrib unnessesary since not allowed.
>>> 			#span.fixAttrib.style.unset = 1
>>> 			p.fixAttrib.align.unset = 1
>>> 			div.fixAttrib.align.unset = 1
>>> 			hr.allowedAttribs = class
>>> 			b.allowedAttribs = xml:lang
>>> 			blockquote.allowedAttribs = xml:lang
>>> 			cite.allowedAttribs = xml:lang
>>> 			em.allowedAttribs = xml:lang
>>> 			i.allowedAttribs = xml:lang
>>> 			q.allowedAttribs = xml:lang
>>> 			strong.allowedAttribs = xml:lang
>>> 			sub.allowedAttribs = xml:lang
>>> 			sup.allowedAttribs = xml:lang
>>> 			tt.allowedAttribs = xml:lang
>>> 		}
>>>
>>> 		## REMOVE OPEN OFFICE META DATA TAGS AND DEPRECATED HTML TAGS
>>> 		## We use this rule instead of the denyTags rule so that we can
>>> 		## protect custom tags without protecting these unwanted tags.
>>> 		removeTags = center, font, o:p, sdfield, strike, u
>>>
>>> 		## PROTECT CUSTOM TAGS
>>> 		keepNonMatchedTags = protect
>>> 	}
>>>
>>> 	HTMLparser_db {
>>> 		## STRIP ALL ATTRIBUTES FROM THESE TAGS
>>> 		## If this list of tags is not set, it will default to: b,i,u,br,center,hr,sub,sup,strong,em,li,ul,ol,blockquote,strike.
>>> 		## However, we want to keep xml:lang attribute on most tags and tags from the default list where cleaned on entry.
>>> 		noAttrib = br
>>>
>>> 		## XHTML COMPLIANCE
>>> 		## Note that applying xhtml_cleaning on exit would break non-standard attributes of typolink tags
>>> 		xhtml_cleaning = 1
>>> 	}
>>>
>>> 	exitHTMLparser_db = 1
>>> 	exitHTMLparser_db {
>>> 		## REMAP B AND I TAGS
>>> 		## b and i tags are used by Mozilla/Firefox in editing mode.
>>> 		## This must be done on exit because the default HTMLparser_db parsing executes the reverse mapping.
>>> 		tags.b.remap = strong
>>> 		tags.i.remap = em
>>>
>>> 		## KEEP ALL TAGS
>>> 		## Unwanted tags were removed on entry.
>>> 		## Without this rule, the parser will remove all tags! Presumably, this rule will be more efficient than repeating the allowTags rule
>>> 		keepNonMatchedTags = 1
>>>
>>> 		## AVOID CONTENT BEING HSC'ed TWICE
>>> 		htmlSpecialChars = 0
>>> 	}
>>>     }
>>> }
>>>
>>> ## Use same RTE processing rules in FE
>>> RTE.default.FE.proc<   RTE.default.proc
>>>
>>> ## RTE processing rules for bodytext column of tt_content table
>>> ## Erase settings from other extensions
>>> RTE.config.tt_content.bodytext>
>>>
>>> ## Make sure we use ts_css transformation
>>> RTE.config.tt_content.bodytext.proc.overruleMode = ts_css
>>> RTE.config.tt_content.bodytext.types.text.proc.overruleMode = ts_css
>>> RTE.config.tt_content.bodytext.types.textpic.proc.overruleMode = ts_css
>>>
>>> Chiaramente poi è da personalizzare in base al foglio di stile che usi tu.
>>>
>>> Con queste due righe:
>>> contentCSS = fileadmin/templates/media/css/rte.css
>>>      classesTable = borderBlue,borderBlack,transparent
>>> Io abilito il foglio di stile e con la seconda riga definisco i nomi delle classi che possono essere date alle tabelle. Le vedi poi nella finestra delle proprietà della tabella.
>>>
>>> Spero di averti risposto.
>>>
>>> Ciao
>>> Federico
>>>
>>>
>>> Il giorno 30/dic/2011, alle ore 10:10, Elena Bartolotti ha scritto:
>>>
>>>> Ciao a tutti e buone feste (per chi se le può godere ^^)
>>>> Sto litigando con l'RTE perchè non mi dà la possibilità di allineare le tabelle.
>>>> Sul testo nessun problema, gli allineamenti vengono applicati tramite classe al paragrafo e va tutto bene, ma se inserisco una tabella, la stessa funzione mi è preclusa e quindi non riesco per esempio a mettere una tabella di 200px allineata al centro, se non intervenendo direttamente sul codice del record, cosa che non posso certo chiedere al mio cliente.
>>>>
>>>> Ho provato ad intervenire con vari codici nel Page TSConfig, ma senza risultato. Quel che è peggio è che poi mi sono resa conto che non mi prende nemmeno le classi incluse di default nell'rte (csc-frame...): se anche le attribuisco, al salvataggio le perdo.
>>>>
>>>> Qualcuno riesce a darmi una soluzione?
>>>>
>>>> Anticipo i miei ringraziamenti a chiunque mi voglia dare una mano e vi auguro nuovamente buone feste!
>>>>
>>>> --
>>>> Elena Bartolotti
>>>> _______________________________________________
>>>> TYPO3-UG-Italy mailing list
>>>> TYPO3-UG-Italy at lists.typo3.org
>>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>>>
>>
>>
>> --
>> <font color="#999999" face="Helvetica, Arial, sans-serif"><font
>> size="-1"><b>Elena Bartolotti</b><br>
>> _________________________________________<br>
>> <br>
>> </font><img alt="InteRa srl"
>> src="file:///C:/Users/Elena Bartolotti/Desktop/Merc!/Merc!/logo-intera.gif"
>> height="38" width="80"><br>
>> <font size="-2"><b>InteRa s.r.l.</b><br>
>> Via R. Murri, 27 - 48124 Ravenna<br>
>> Tel. 0544 462628 Fax 0544 467457<br>
>> E-mail elena at intera.it - www.intera.it<br>
>> P.IVA, Cod. Fisc. e Iscr. Reg. Imprese di RA 02039980392<br>
>> Cap. Sociale € 10.000,00<br>
>> <br>
>> Ai sensi del D. Lgs. n. 196/2003 si precisa che le informazioni
>> contenute nella presente comunicazione sono strettamente riservate e ad
>> uso esclusivo del destinatario. In caso di ricevimento, anche parziale,
>> del presente documento da parte di soggetto diverso dal destinatario
>> indicato, questi deve ritenersi diffidato dal farne uso a qualsiasi
>> titolo e distruggere il file erroneamente ricevuto.</font></font><br>
>> _______________________________________________
>> TYPO3-UG-Italy mailing list
>> TYPO3-UG-Italy at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>


-- 
<font color="#999999" face="Helvetica, Arial, sans-serif"><font
  size="-1"><b>Elena Bartolotti</b><br>
_________________________________________<br>
<br>
</font><img alt="InteRa srl"
  src="file:///C:/Users/Elena 
Bartolotti/Desktop/Merc!/Merc!/logo-intera.gif"
  height="38" width="80"><br>
<font size="-2"><b>InteRa s.r.l.</b><br>
Via R. Murri, 27 - 48124 Ravenna<br>
Tel. 0544 462628 Fax 0544 467457<br>
E-mail elena at intera.it - www.intera.it<br>
P.IVA, Cod. Fisc. e Iscr. Reg. Imprese di RA 02039980392<br>
Cap. Sociale € 10.000,00<br>
<br>
Ai sensi del D. Lgs. n. 196/2003 si precisa che le informazioni
contenute nella presente comunicazione sono strettamente riservate e ad
uso esclusivo del destinatario. In caso di ricevimento, anche parziale,
del presente documento da parte di soggetto diverso dal destinatario
indicato, questi deve ritenersi diffidato dal farne uso a qualsiasi
titolo e distruggere il file erroneamente ricevuto.</font></font><br>


More information about the TYPO3-UG-Italy mailing list