Hi I'm using p:editor from primefaces (v.4.0)
Is there any way to setup the editor, so that every new line will be include in a <p></p> element ?
So far I've noticed that new lines are currently inserted with <br /> or <div> or nothing at all (plain text), depending on the selected font style, or the client's browser!
PrimeFaces uses CLEditor, and in that editor the line break is produced automatically by the Browser not CLEditor, because the iframe is in designMode.
In IE <p> is included unless a <div> was started. On all the others it's <div>.
You should provide that consistency in the back-end, by replacing each <div> with <p>
Read more:
Rich-Text Editing
Related
I am using the Firefox webdriver for Selenium to scrape a webpage that looks to be rendered with React on the client side. The classes in the rendered DOM look dynamically generated, and seem to change with every new request. There are also many button elements on the page, some of which are not in the viewport. So my strategy is to search for a way to click on a button that contains text that I enter using selenium. Several buttons will contain the text, and I want to just find the first such button.
Using selenium/xpath, how would I select the first button that contained the text E9 1QJ?
<button>
<div><svg ...> </div>
<div>
<div>London</div>
<div>E9 1QJ</div>
</div>
</button>
<button>
<div><svg ...> </div>
<div>
<div>London Foo Bar</div>
<div>E9 1QJ</div>
</div>
</button>
Thanks
This should work:
{driver}.find_element_by_xpath("//button[div/div[text()='E9 1QJ']][1]")
But keep in mind that a solution like this it is not very flexible and could break with a minimum change in the html structure.
I'm brand new to Chrome Extension creation and was hoping someone could direct me to some documentation specific to my goals.
I'd like to create a form-like text box (screenshot of text-box) that sits on the Chrome omnibar where the Extension icons stack up. I'd like to be able to type plain text into this box while web-browsing. Also, I'd like to be able to tap Ctrl+K and have the cursor jump into this box and highlight whatever's there for easy copy/pasting.
Essentially, I want to use Firefox's search-bar/box presentation in Chrome as a scratch-pad for taking plain text notes while web-browsing.
I followed the elementary documentation on creating an extension and the HTML I wrote works well in presentation when clicking the icon-button. But I don't want to have to click a button. I just want the Form box to exist on the omnibar persistently and I also want to access it via Ctrl+K.
Can anybody help?
Here's the HTML I wrote (looks just like the Firefox search-bar/box):
<html>
<form action="">
<p>
<input type="text" size="40" />
</p>
</form>
</html>
1: <cms:contentload editable/>
2: <cms:contentload editable/>
there are two of <cms:contentload> in one jsp page.
The problem is, the edit button of first <cms:contentload>, instead of staying at the tag, has been positioned to the second <cms:contentload> tag. and overlay completely.
First, the edit button don't work in tables. Now i think may be will be your html divs. The Edit button is displayed in the first div you find
supose
<div>
[...]
<cms:contentload editable="true">
[...]
<div>
[...]
<cms:contentload editable="true">
[...]
</cms:contentload>
</div>
</cms:contentload>
</div>
also check you css
I have been using display.none, for the hid-whens for example, all the hidden fields were kept in a section and section was hidden from web by using Display.none.
This is working for Internet Explorer till IE 9, but for IE 10 all the hidden fields are shown.
Can anyone help in this matter. Any alternative or approach.
Without seeing the page it sis very difficult to guess.
Try validating the html through one of the many online html validators as something may not be closed or Notes might have given you an unwanted code addition .
Try adding a background color to the css #wrapper to make sure the css is being called.
Take a copy of the form and start removing all other elements one section at a time to see if something else is causing the issue.
Add {meta http-equiv="X-UA-Compatible" content="IE=10;IE=9; IE=8; IE=7; IE=EDGE" /} as the very top meta tag and see if that fixes it. Replace the curly braces obviously.
All the best in finding the issue.
It sounds like just the section element is getting hidden. Without seeing the code I can't tell why that changes between ie 9 and 10 but ie is famous for having varying behavior between versions.
One alternative that comes to mind: You could wrap the section and the fields in a DIV element using pass thru HTML and set that div's style to display:none. That is pretty standard and should work across browsers.
Update: To give you an idea what I'm talking about, check out this jsfiddle.
HTML:
<form>
<div class="wrapper">
<input type="text" name="Field 1" /><br />
<input type="text" name="Field 2" /><br />
<input type="text" name="Field 3" />
</div>
<span>Some text that won't be hidden.</span>
</form>
CSS:
.wrapper {
#display:none;
}
You can remove the # next to the display:none and see the difference, even in IE 10.
You'll need to look closely at the HTML being rendered by Domino and make sure that in fact all the fields you are trying to hide are surrounded by the DIV that is hidden.
I cannot figure out how to change a text in the header section of my site. I am trying to do this in my custom module's theme. This is how my header looks like:
<header>
<div class="container">
<div class="row-fluid">
<div id="Logo"><h1>#WorkContext.CurrentSite.SiteName</h1></div>
<h3>[ We Know Business ]</h3>
<a class="btn btn-navbar btn-menuh" data-parent="#collapse-nav" data-target=".collapse-menuh">btn</a>
<a class="btn btn-navbar btn-search" data-parent="#collapse-nav" data-target=".collapse-search">btn</a>
</div>
</div>
</header>
I changed [We Know Business] to [We know Businesses] but the updated text is not coming up on any page of my site.
However, my main objective is to use HTML5 and Responsive compatibility in IE8 by injecting conditional CSS and js like this:
<!--[if lt IE 9]>
<script src="/themes/intrust/js/html5shiv.js"></script>
<![endif]-->
I cannot see the above snippet in "View Source" option.
The reason I changed the text only to check whether I am doing it at the right place or not. When it didn't work I turned Shape Tracing tool on to see what template is being used for the header. But could not highlight any part of the header at all!
Isn't Layout.cshtml of my custom theme liable to render the header section? If not, which template I have to look for?
I must be doing something wrong here but cannot figure out what! Please help!
NB: I tried resetting IIS several times but had no luck either.
This is a bit late but what you are looking for is overriding document.cshtml.Orchard has a default in the folder Orchard\src\Orchard.Web\Core\Shapes\Views folder. Copy the file document.cshtml to your theme and put the items that you want in the header section of this document.