Summernote为您提供了在创建编辑器时将焦点放在编辑器上的选项,并传递以下选项:
$('#summernote').summernote({
focus: true
});
Run Code Online (Sandbox Code Playgroud)
但是在初始化之后,似乎你无法通过点击按钮或类似的东西来关注textarea.我尝试了几种方法,没有成功.
谁做到了?
我正在尝试执行以下查询:
public function findByNotifications($ownerId)
{
$em = $this->getEntityManager();
$query = $em->createQuery('
SELECT n FROM
(SELECT n FROM DelivveWebBundle:UserAd n
INNER JOIN n.ad ad
WHERE ad.owner = :ownerId
LIMIT 20
UNION
SELECT n FROM DelivveWebBundle:UserAd n
INNER JOIN n.user u
INNER JOIN n.ad ad
WHERE u.id = :ownerId
AND ad.status = :progress
LIMIT 20)
notofication
LIMIT 20;
')->setParameter('ownerId', $ownerId)
->setParameter('progress', Constant::AD_IN_PROGRESS);
$result = $query->getResult();
return $result;
}
Run Code Online (Sandbox Code Playgroud)
生成我的所有通知:
public function showNotificationsAction()
{
$this->denyAccessUnlessGranted('ROLE_USER', null, 'Unable to access this page!');
$owner = …Run Code Online (Sandbox Code Playgroud)