[TYPO3-UG Italy] Problemi con RTE

Paolo Bragagni paolo.bragagni at gmail.com
Wed Sep 30 13:36:34 CEST 2015


Se vedete qualcosa di strano....



TS:
###################################################
# RTE parse function
###################################################
lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list
>
lib.parseFunc_RTE {
externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
default = table
always = 1
list = table, table-striped, table-bordered, table-hover, table-condensed,
table-responsive
}
}





RTE in Page Config:

RTE.classes {

table {
name = Base
}

table-striped {
name = Striped rows
}

table-bordered {
name = Bordered table
}

table-hover {
name = Hover rows
}

table-condensed {
name = Condensed table
}

table-responsive {
name = Responsive table
}
code {
name = code
value = font-family:Courier, monospace;font-size: 0.9em;padding: 8px 35px
8px 14px;border: 1px solid #ccd;background-color: #f0f0f4;
}
alert-info {
name = alert-info
value = color: #3a87ad;padding: 8px 35px 8px 14px;text-shadow: 0 1px 0
rgba(255, 255, 255, 0.5);border: 1px solid #bce8f1;-webkit-border-radius:
4px;-moz-border-radius: 4px;border-radius: 4px;color:
#3a87ad;background-color: #d9edf7;
}
alert-warning {
name = alert-warning
value = padding: 8px 35px 8px 14px; text-shadow: 0 1px 0 rgba(255, 255,
255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5;
-webkit-border-radius:
4px; -moz-border-radius: 4px; border-radius: 4px; color: #c09853;
}
alert-error {
name = alert-error
value = padding: 8px 35px 8px 14px; text-shadow: 0 1px 0 rgba(255, 255,
255, 0.5); border: 1px solid #eed3d7; -webkit-border-radius: 4px;
-moz-border-radius:
4px; border-radius: 4px; color: #b94a48; background-color: #f2dede;
}
alert-success {
name = alert-success
value = padding: 8px 35px 8px 14px; text-shadow: 0 1px 0 rgba(255, 255,
255, 0.5); border: 1px solid #d6e9c6; -webkit-border-radius: 4px;
-moz-border-radius:
4px; border-radius: 4px; color: #468847; background-color: #dff0d8;
}

indent {
name = indent
value = margin-left: 2.5em;
}
read-more-content{
name = read-more-content
value = background-color: #F2F5A9; font-style: italic;
}
lead {
name = lead
value =font-size: 21px!important;font-weight: 200;line-height: 30px;
}
blockquote {
name = blockquote
value =padding: 0 0 0 15px;margin: 0 0 20px;border-left: 5px solid
#eeeeee;margin-bottom: 0;font-size: 17.5px!important;font-weight:
300;line-height: 1.25;
}


primary {
name = primary
value = color: #dd4814;
}
muted {
name = muted
value = color: #aea79f;
}
warning {
name = warning
value = color: #c09853;
}
danger {
name = danger
value = color: #b94a48;
}
success {
name = success
value = color: #468847;
}
info {
name = info
value = color: #3a87ad;
}

small {
name = small
value = font-size: 10px!important;
}

label {
name = label
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #999999;
}
label-important {
name = label-important
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #df382c;
}
label-success {
name = label-success
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #025A0F;
}
label-warning {
name = label-warning
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #d4814;
}
label-info {
name = label-info
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #772953;
}
label-inverse {
name = label-inverse
value = -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius:
3px; padding: 2px 4px; font-size: 11.844px; font-weight: bold;line-height:
14px;: #ffffff;t-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);White-space:
nowrap;vertical-align: baseline;background-color: #333;


}








}



RTE {

// Default RTE configuration (all tables)
default {

// Default target for links
defaultLinkTarget = _top

// Buttons to show
//showButtons = *
showButtons (
formatblock, blockstyle, textstyle, linebreak, bold, italic, underline,
strikethrough, bar, orderedlist, unorderedlist, bar, left, center, right,
justifyfull, linebreak, copy, cut, paste, bar, undo, redo, bar,
findreplace, removeformat, bar, link, unlink, linkmaker, bar, imagemaker,
bar, table, bar, line, bar, insertparagraphbefore, insertparagraphafter,
bar, chMode, showhelp, about, linebreak, tableproperties, rowproperties,
rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore,
columninsertafter, columndelete, columnsplit, cellproperties,
cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge, image
)

## Enable the image button
showButtons := addToList(image)

// Toolbar order
toolbarOrder = formatblock, blockstyle, textstyle, linebreak, bold, italic,
underline, strikethrough, bar, textcolor, bgcolor, bar, orderedlist,
unorderedlist, bar, left, center, right, justifyfull, linebreak, copy, cut,
paste, bar, undo, redo, bar, findreplace, removeformat, bar, link, unlink,
linkmaker, bar, imagemaker, image, bar, table, bar, line, bar,
insertparagraphbefore, insertparagraphafter, bar, chMode, showhelp, about,
linebreak, tableproperties, rowproperties, rowinsertabove, rowinsertunder,
rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete,
columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete,
cellsplit, cellmerge
buttons.image.options.removeItems = textcolor

RTEHeightOverride = 700
RTEWidthOverride = 700

//hide / show HTML tag
buttons.formatblock.orderItems = h1, h2, h3, h4, h5, h6, p, article,
section, quotation

// Make possible to read classes from the rte.css file
buttons.textstyle.tags.span.allowedClasses >
buttons.textstyle.tags.span.allowedClasses = detail, important, code,
label, label-important, label-success, label-warning, label-info,
label-inverse, danger, blockquote, lead, muted, primary, small, success,
warning
buttons.textstyle.tags.REInlineTags >
buttons.textstyle.REInlineTags >

buttons.blockstyle.tags.table.allowedClasses >
buttons.blockstyle.tags.table.allowedClasses = table, table-striped,
table-bordered, table-hover, table-condensed, table-responsive




// Disable contextual menu
contextMenu.disabled = 1

// Display status bar
showStatusBar = 1

// RTE stylesheet
contentCSS = EXT:speciality/Resources/Public/Source/StyleSheets/Site/rte.css

// Remove HTML tags and their content
removeTagsAndContents =

// Use CSS formatting when possible
// ignoreMainStyleOverride = 1
useCSS = 1
showTagFreeClasses = 1

// Processing rules
proc {

// Allowed Classes to be saved
allowedClasses  < RTE.default.classesCharacter
allowedClasses := addToList(table, table-striped, table-bordered,
table-hover, table-condensed, table-responsive, code)


// Transformation method
overruleMode = ts_css

// Do not convert BR into linebreaks
dontConvBRtoParagraph = 1

// Map paragraph tag
remapParagraphTag = p

// Tags allowed
allowTags = lead, a, abbr, acronym, address, blockquote, b, br, caption,
center, cite, code, div, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li,
link, ol, p, pre, q, sdfield, span, strike, strong, sub, sup, table, thead,
tbody, tfoot, td, th, tr, tt, u, ul

// Tags denied
denyTags >

// Attributes to keep for P & DIV
keepPDIVattribs = xml:lang,class,style,align

// Tags allowed outside P & DIV
allowTagsOutside =
img,hr,table,tr,th,td,h1,h2,h3,h4,h5,h6,br,ul,ol,li,pre,address,span

// Tags allowed in Typolists
allowTagsInTypolists = br,font,b,i,u,a,img,span

// Keep unknown tags
dontRemoveUnknownTags_db = 1

// Allow tables
preserveTables = 1

// Entry HTML parser
entryHTMLparser_db = 1
entryHTMLparser_db {

// Tags allowed
allowTags < RTE.default.proc.allowTags

// Tags denied
denyTags >

// HTML special characters
htmlSpecialChars = 0

// Allow IMG tags
tags.img >

// Additionnal attributes for P & DIV
tags.div.allowedAttribs = class,style,align
tags.p.allowedAttribs = class,style,align

// Tags to remove
removeTags = center, font, o:p, sdfield, strike, u

// Keep non matched tags
keepNonMatchedTags = protect
}

// HTML parser
HTMLparser_db {

// Strip attributes
noAttrib = br

// XHTML compliance
xhtml_cleaning = 1
}

// Exit HTML parser
exitHTMLparser_db = 1
exitHTMLparser_db {

// Remap bold and italic
tags.b.remap = strong
tags.i.remap = em

// Keep non matched tags
keepNonMatchedTags = 1

// HTML special character
htmlSpecialChars = 0
}
}
}
}

// Frontend RTE configuration

RTE.default.FE < RTE.default

RTE.default.FE.proc < RTE.default.proc
RTE.default.FE < RTE.default




Il giorno 30 settembre 2015 13:18, Paolo Bragagni <paolo.bragagni at gmail.com>
ha scritto:

> nisba
>
> il problema sembra essere nel rendering successivo perche se vado a vedere
> nel db la classe c'e' (a parte che io vorrei che mi aggiungesse sempre
> anche la classe 'table', invece ci mette solo per esempio table-striped)
>
> Ps.
> grazie
>
> 2015-09-30 13:09 GMT+02:00 Valentina Barbiero <
> valentina.barbiero at newtvision.com>:
>
> > CIao,
> >
> > il problema potrebbe essere nella configurazione del Ts config. Io nel
> > setup ho aggiunto anche questo, prima del codice che ti ho inviato:
> >
> > lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.
> > fixAttrib.class.list >
> >
> > Il giorno 30 settembre 2015 13:08, Paolo Bragagni <
> > paolo.bragagni at gmail.com>
> > ha scritto:
> >
> > > macche..
> > >
> > > comunque ho questo nel setup
> > >
> > > lib.parseFunc_RTE {
> > > externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
> > > default = table
> > > always = 1
> > > list = table, table-striped, table-bordered, table-hover,
> > table-condensed,
> > > table-responsive
> > > }
> > > }
> > >
> > > Il giorno 30 settembre 2015 13:04, Valentina Barbiero <
> > > valentina.barbiero at newtvision.com> ha scritto:
> > >
> > > > Ciao Paolo,
> > > >
> > > > prova ad aggiungere questo nel setup:
> > > >
> > > >
> > > > lib.parseFunc_RTE {
> > > >     externalBlocks {
> > > >         table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
> > > >             default = table table-striped
> > > >             always = 1
> > > >            # list := addToList(no_border, table-striped)
> > > >          # list >
> > > >
> > > >         }
> > > >     }
> > > > }
> > > >
> > > > Valentina
> > > >
> > > > Il giorno 30 settembre 2015 13:01, Paolo Bragagni <
> > > > paolo.bragagni at gmail.com>
> > > > ha scritto:
> > > >
> > > > > T3 6.2
> > > > > con FluidTypo3
> > > > >
> > > > > In pratica ho piu o meno questo tipo di problema
> > > > >
> > > > > https://forge.typo3.org/issues/64768
> > > > >
> > > > > cioe' nel db vedo
> > > > >
> > > > > <table summary="" class="table-striped"><thead><tr><th
> > > > > scope="col">ò</th><th scope="col">ò</th><th scope="col">ò</th><th
> > > > >
> > > > >
> > > >
> > >
> >
> scope="col">ò</th></tr></thead><tbody><tr><td>a</td><td>a</td><td>a</td><td>a</td></tr></tbody></table>
> > > > > </p>
> > > > >
> > > > > notare la classe "table-striped"
> > > > >
> > > > > mentre nel FE vedo
> > > > > <table summary="" class=""><thead><tr><th scope="col">ò</th><th
> > > > > scope="col">ò</th><th scope="col">ò</th><th
> > > > >
> > > > >
> > > >
> > >
> >
> scope="col">ò</th></tr></thead><tbody><tr><td>a</td><td>a</td><td>a</td><td>a</td></tr></tbody></table>
> > > > >
> > > > > cioe' mi toglie la classe
> > > > >
> > > > > cosa puo' essere?
> > > > >
> > > > > Grazie in anticipo, Paolo
> > > > > _______________________________________________
> > > > > TYPO3-UG-Italy mailing list
> > > > > TYPO3-UG-Italy at lists.typo3.org
> > > > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > *----------------------------------------------------------------------*
> > > > *Valentina Barbiero*
> > > > *WebDesigner / Multimedia Specialist*
> > > >
> > > > Url: http://www.newtvision.com
> > > > Tel: +39 3283347595 | Tel: +39 06 5560305
> > > > Skype: valentina-barbiero | Twitter: @barbiero
> > > > Facebook: https://www.facebook.com/newtvision
> > > > Linkedin: http://it.linkedin.com/in/valentinabarbiero
> > > > _______________________________________________
> > > > TYPO3-UG-Italy mailing list
> > > > TYPO3-UG-Italy at lists.typo3.org
> > > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
> > > >
> > > _______________________________________________
> > > TYPO3-UG-Italy mailing list
> > > TYPO3-UG-Italy at lists.typo3.org
> > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
> > >
> >
> >
> >
> > --
> > *----------------------------------------------------------------------*
> > *Valentina Barbiero*
> > *WebDesigner / Multimedia Specialist*
> >
> > Url: http://www.newtvision.com
> > Tel: +39 3283347595 | Tel: +39 06 5560305
> > Skype: valentina-barbiero | Twitter: @barbiero
> > Facebook: https://www.facebook.com/newtvision
> > Linkedin: http://it.linkedin.com/in/valentinabarbiero
> > _______________________________________________
> > TYPO3-UG-Italy mailing list
> > TYPO3-UG-Italy at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
> >
> _______________________________________________
> TYPO3-UG-Italy mailing list
> TYPO3-UG-Italy at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-italy
>


More information about the TYPO3-UG-Italy mailing list