Bootstrap-table converts html tags to text (or escape sequence) in cell - bootstrap-table

I've just upgraded to Bootstrap-table 1.10.0. (from 1.9.0) It now seems that any html tags added to a cell (eg. "<div></div>") is converted to text (or escape sequence). There seems to be a "data-formatter" that can be used as a workaround but its usage is limiting for my purpose.
Is there a setting to add to a bootstrap-table or cell to accept html tags as is?
Thanks!

I'm experiencing it as well, created an issue on the github tracker: https://github.com/wenzhixin/bootstrap-table/issues/1933
From github: add data-escape to the table tag

Related

How to elegantly modify html to inject html element after x-th paragraph on the server side?

I need to modify html coming from external file (server side) before I render it and inject a quote 'component' like this:
This component needs to be injected after 2nd paragraph and I'm planning to use htmlagillity pack. Any examples? Is HtmlNode.InsertAfter() method good choice once I found third paragraph which should be trivial.
Another question is would it be possible to inject sitecore placeholder or even usercontrol that is going to render my quote instead of pure html? I feel it should be but not sure what would be good approach.
Thanks
I can suggest two possible approaches here:
1) Use snippets with some customisation. Snippets allow users to insert pre-defined chunks of HTML into a RTE field. You could have a pre-defined piece of HTML which might have some identifier to indicate it should use custom processing (I would suggest some data-xxx style attribute which would not conflict with any CSS or JavaScript). Then you could create a new renderField pipeline processor which would detect the data-xxx attribute within the content of a rich text field - you would use HtmlAgilityPack for this and then replace that snippet with the contents of your server-side file.
-or-
2) Split your text content into two separate chunks and have two instances of a "HtmlText" rendering within the placeholder, with a rendering for your quote text between them in the same placeholder.
I would advise that having a rule to insert text after the second paragraph would be quite 'brittle' as this would be very reliant on content editors setting the rich text field contents in quite a precise way e.g. to always ensure two or more paragraphs and to always break text with paragraphs - they might decide to use a load of line breaks instead to split their text. That said if you did do this, you would create a new renderField pipeline processor.

Drupal text format ( input/output filter) issue

I am running drupal 7. I get ckeditor installed. am using full html as text input in filter option.
Am facing some problems with the output. This is specially for html element.
There is no line break between to paragraph !
E.G: this code:
<p> my text par one </p><p>my text par two</p>
output :
my text par one my text par two
(IN A SINGLE LIGN !)
I would like to get linbreak on each paragraph as we can expect it from any html code.
thank you
You need to add required HTML tags under filter which you are using.
URL :- admin/config/content/formats/full_html
Also on same page check Enabled filters configuration.
Display any HTML as plain text - unchecked
List item Convert line breaks into HTML - checked
Cheers!!!

CSS for specific text on Confluence

I am wondering if there is a way to use custom css for some specific text on my confluence page (not using embedded HTML).
Sorry this is an old question, but for the sake of people who search for an answer to this question: you can use span or div macros and use the custom css to apply whatever style you want to their contents.
If necessary, you could create custom div and span classes to allow for multiple styles to be applied to selections of text.
EDIT: Here is an example of the wikimarkup you could use to do this
{div:class=customCss|style=float:left; margin-right:50px}
Custom text in a div
{div}
So you can either use the div class and apply a style in the custom css for the confluence space, or you can use an inline style for the div.
You can do this ...
{composition-setup}import.css=/download/attachments/123456789/custom.css
{composition-setup}
That's if you've stored a custom.css file as an attachement. You'd obviously need to replace 123456789 with the actual attachment number.
You can also link CSS on an external site (with an absolute URL), but if you have any automatic URL formatting, that tends to mess it up everytime you change the document.
I use a User Macro that renders the $body in HTML. Then I can put whatever HTML tags I want in the wiki page within the user macro tag.
There could be a way to reach what you want to reach, but there is some information missing (from you). What confluence allows is the following:
If you have admin rights to the confluence wiki space, you could add there a custom style sheet that applies to all wiki pages. Else you could follow the answer of Mus.
Then you should analyse the wiki page in source form. So load a wiki page you want to style, and look at the source of that wiki page in your browser. Depending on your browser, this may be CTRL-U or something similar. Here in chrome, the page menu says View page source.
Try to find the defining selector for your wiki text you want to style in some form. A reasonable hack could be:
Find a wiki style that is not used by others. I have experimented with ~subscript~.
Find the HTML tags that are built by using that style. In my example, it was <sub>subscript</sub>.
Use your custom style sheet to style text of that style.
However, this may change the text where the style is used for its original sense :-(
You can specify custom CSS in your Confluence page via the div and span macros.
In recent Confluence versions (4.0 and later), you can do this as follows:
Type {div} or {span}. On typing the closing brace }, auto-complete will convert the text to a macro.
Left-click on the frame of the macro and select the Edit button
Enter the custom CSS into the Style field and close the dialog
Enter your text into the macro frame. It will then have the style you specified.

How to strip out character references inserted by Diazo into text nodes

I'm using plone.app.theming 1.0b5 and Plone 4.1 rc3. Our Diazo rules contain an number of external content includes and we're using one such include to insert Google Analytics script into the result:
<append theme="/html/head" content="/html/head/script"
href="##standard-page-elements" />
Unfortunately the script tag from the view is being mangled during the transform such that any carriage returns are converted to character references (
)
This is due to the way lxml serializes and deserializes (see this Plone bug report).
I'd like a work around in the meantime but can't figure out a Diazo rule that would strip these references out.
As noted above:
The bug has been fixed in the trunk of Diazo (thanks Laurence) so I no longer need to do this. I didn't manage to figure it out: it doesn't seem to me you can alter external content through Diazo, only the main content.

How to disable header on frontpage of rst2pdf document?

I am generating some PDF's and I would like to disable the header on the frontpage. I know there are built-in templates in rst2pdf and one template is called coverPage but I don't seem to be able to get it to work.
The manual is saying you should use a
..raw:: pdf
PageBreak coverPage
statement but that will insert a empty before the coverpage, so how can I have a coverpage without a header and without using the oddeven directive (I want to use the same header on all remaining pages).
Thanks for your suggestions!
That's how you change the stylesheet after the cover page. You'll need to create a custom stylesheet that specifies what is the format of the first page and then change the style for the rest of document. Have a look at chapter 15 of the manual.
Note: current accepted answer contains broken link (linked website has gone).
The correct answer is simple:
1) In you style-file define:
pageSetup:
firstTemplate: coverPage
2) Then in your template, when you want to start using header/footer add:
..raw:: pdf
PageBreak cutePage
Make sure cutePage has set header/footer to true.

Resources