ueditor1.2.1 Modify Hyperlink Default value
The first hyperlink file is the link.html of the link directory in the Dialogs directory in the Ueditor directory.
As shown in figure:
Then add the Value property and value to the link address or title, and you want the checked property to open in the new window, as shown in the red code below.
<tr>
<td><labelfor= "href" > link address:</label></td>
<td><input class= " TXT "id=" href "type=" text "value=" http://www.jb51.net "/></td>
</tr>
<tr>
<td ><labelfor= "title" > title:</label></td>
<td><input class= "txt" id= "title" Type= " Text "value=" cloud Habitat Community (jb51.net) "/></td>
</tr>
<tr>
<td colspan=" 2 ">
< Labelfor= "target" > whether to open:</label>
<input id= "target" type= "checkbox" checked= "checked" in a new window/>
</td>
</tr>
After the above work, the page can not be displayed, because the content is initialized by the JS to control. As shown in the JS code of the file
$G ("title"). Value = URL? link.title: "";
$G ("href"). Value = URL? URL: ';
$G ("target"). Checked = url&& Link.target = = "_blank"? True:false;
The URL property defaults to False, that is, will not initialize the above content, so we have to find the initialization of JS, change the URL value is true.
As shown in the following illustration:
If the above work is done, if not, (hint link or link.title is null) look below!
When the value of the default link is displayed, but after you have determined it without a hyperlink, modify it to the following code. The previously modified URL is changed back to the original, that is, the URL,
url = ' http://www.jb51.net ';
$G ("title"). Value = ' cloud-dwelling community (jb51.net) ';
$G ("href"). Value =url;
$G ("target"). checked =true;
$focus ($G ("href"));
As shown in the following illustration:
After modification, the result should come out!