Pimcore content editor removing <section> tags - wysiwyg

I am working on Pimcore. In CMS I have created a page and added block to render Html on page. The page is working but, I am facing a problem that the Html editor in CMS is removing <section> tags while saving the Html. I couldn't find the function where it is saving the html. Tried to do some trick in its js file by adding section in allowedContent object allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td section":{propertiesOnly:!0,attributes:"dir"}}
but, It couldn't help it at all.

The Pimcore HTML Editor is the CKEditor. To keep sections in the editor, you'll need to modify the CKEditor and add the section widget:
https://ckeditor.com/cke4/addon/section

Related

embed javascript inside body using wicket

There are a few solutions that I have seen but none of them worked for me. I am using Wicket 1.6
my wicket contains the following
WebMarkupContainer scriptLeaflet = new WebMarkupContainer("script_leaflet");
scriptLeaflet.add(new AttributeAppender("src", urlFor(new JavaScriptResourceReference(BasePage.class,"js/leaflet.js"), null).toString()));
add(scriptLeaflet);
my html contains the following
<script wicket:id="script_leaflet"></script>
I am using firefox's inspect element to check the content. I dont see any javascript in the rendered html page. If I replace the script tag with div tag just to see what happens I see the src url on the div tag as <div src="...."> but does not work when using the script tag

How to use text-overflow:ellipsis with tinymce

I have a master detail type view setup where you can enter data on the right side (detail) and it will show in a summary on the left side (detail). I accomplished this view using CSS and jQuery. All of the data is coming from a mysql database.
The problem is caused by the html tags that tinymce inserts into the textarea. When I try to display it using the text-overflow:ellipsis; CSS it doesn't put in the ellipsis.
CSS:
.OverflowData {
text-overflow:ellipsis;
overflow: hidden;
white-space: nowrap;
}
Here is a stripped down jsFiddle with the resulting data with the tinymce html tags added and what happens on the left side.
Now Here is a version where I stripped out the <p> tags and the ellipsis shows properly.
So my question is: is it possible to have the summary and ellipsis show properly in the first case or must I strip out all of the html from the tinymce textarea beforehand?
I am open to other suggestions.
The settings have to be on the immediate parent so this works when added to your sample (note the 'p' in the selector):
.OverflowData p {
text-overflow:ellipsis;
overflow: hidden;
white-space: nowrap;
}

How can I enable tinyMCE in Umbraco to add a div with a class attribute and contain a paragraph?

I need to allow add a div with a class attribute in tinyMCE in Umbraco. I can add a div, but all content in the div is just text. I need that text has a paragraph, and finally add a class attribute for the div.
It's a little hard to understand what you are asking, but I think this should help.
http://our.umbraco.org/wiki/recommendations/recommended-reading-for-content-editors/adding-styles-to-the-tinymce
You can basically associate a stylesheet with the tinyMCE and then add styles to it that will appear in the style dropdown
You may use
tinymce.activeEditor.execCommand('insertHTML', false, '<div class="section'></div>');
This will insert the specified html into the editor at the local caret position.
Be aware that your valid_elements and valid_children configuration settings won't strip out anything from the html that you insert.
If you can paste your template code then we can be more of a help to you.
What you want to do is wrap your <umbraco:Item field="aliasOfYourRTE" runat="server" />
with the div you want so in your case your code will look like this:
<div class="YOURCLASSNAMEHERE">
<umbraco:Item field="bodyText" runat="server" />
</div>
The umbraco RTE automatically spits out <p> </p> tags when content is inserted. Also, make sure you are publishing your node so that your content is viewable on the front end.
Hope this helps.
Go to Settings - Styles.
Open the stylesheet with the styles for the Format dropdown of TinyMCE in Data Type Richtexteditor.
Add a style with the Alias div.class, e.g. div.alert alert-danger.
If you then click in TinyMCE on a paragraph and then choose in the Format dropdown this style the paragraph is formatted as follows:
<div class="alert alert-danger"> ... </div>
Is this what you wished to do?

How to include iframe coding in joomla

How to include iframe coding in joomla
Joomla has TinyMCE as default Editor. It don't allow iframe tag.
You can enable iframe tag in Editor.
Go to > Extensions > Plugins > TinyMCE
Paste iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]
in Extended Valid Elements
Now go back to your editor, open html view and paste your iframe code. It will save it.
Edit HTML in the editor and add the <iframe> tag there.
I needed to paste an image in a frame, so after i understood that i can't use frames i paste this code, cause i needed scroller.
<p style="overflow:scroll;width:700px;"><img style="border: 1px solid #000000;" src="/images/img.png" alt="img"></p>
If you need to paste a video from youtube it is better to hide the video under a image (screensho for example) giving the link to video. not iframe nor embed doesn't work in joomla.
hope that help)

Render the presence of a <script> tag in TinyMCE

I managed to get TinyMCE to keep my <script> tag in the source, so it is no longer stripped as an invalid tag. However, in edit mode, it doesn't render anything. The script tag is there in the html view, but it's just a blank line in edit mode.
Instead, I want tinyMCE to render anything instead of nothing. Even if it is just simple text like [here lies a script]. Is this possible? How? I can't get it working for the life of me. Thanks!
You can use stylesheets to style script elements, I would advise trying that in TinyMCE, here's a fiddle so you can see what I mean:
https://jsfiddle.net/plenuM/m9zr1dqw/
script {
display:block;
height:20px;
width:100%;
background:red;
text-align:center;
color:#fff;
overflow:hidden;
}
script:before {
content:"(SCRIPT)";
}
You will want to only import the CSS when TinyMCE is active though, the TinyMCE documentation can assist you with that.
The script tag should act as if on a regular html page.