jquery.mentionsInput and ckEditor

馋奶兔 提交于 2019-12-22 09:04:31

问题


This is just to help the people who is looking for something like mentions in ckeditor.

I modified jquery.mentionsInput to work together with ckEditor and .. It is working :)

You can see this online: http://jsfiddle.net/us6qo3Lc/ (type: @ken)

<head>
    <meta charset="utf-8">
    <script src="jquery-1.11.0.min.js"></script>
    <script src="ckeditor.js"></script>
    <link href="sample.css" rel="stylesheet">

    <link href='jquery.mentionsInput.css' rel='stylesheet' type='text/css'>
    <script src='underscore-min.js' type='text/javascript'></script>

    <script src='autocomplete.js' type='text/javascript'></script>
</head>
<body>
    <form action="sample_posteddata.php" method="post">
        <textarea class="mention" cols="80" id="editor1" name="editor1" rows="10">
            teste <b>teste</b> teste <em>teste</em> teste
        </textarea>
        <p style="overflow: hidden">
            <input style="float: left" type="submit" value="Submit">
        </p>
    </form>
</body>
</html>

autocomplete.js is the code I created and it is in fiddle, ok ?

Well if someone with time, and knowledge, improve the code and maybe create a specific plugin with this .. I think the entire comunity will love.

I know the code is a mess .. so there are some space to improve it :)

I hope this help somebody .. thanks :)


回答1:


I'm also interested in this so as a first step I added back all the comments from jquery.mentionsInput.js into your source.

http://jsfiddle.net/45k0ypwr/1/

I tried adding it as an embedded sample but stacksnippets.net does not like it

<form action="sample_posteddata.php" method="post">
    <textarea class="mention" cols="80" id="editor1" name="editor1" rows="10">
        teste <b>teste</b> teste <em>teste</em> teste
    </textarea>

    <p style="overflow: hidden">
        <input style="float: left" type="submit" value="Submit">
    </p>
</form>


来源:https://stackoverflow.com/questions/30131956/jquery-mentionsinput-and-ckeditor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!