在tiny mce中创建选择
我在应用程序中使用微型 mce,并使用自定义工具栏将属性应用于文本。我在 FF 和 Chrome 上也运行得很好,但在 IE 上却失败了。这是由颜色框的点击事件引起的。我已经使用 mColorPicker 插件来应用颜色属性,但是当我单击 IE8 中的颜色框时,所选文本被取消选择,并且由于选择为空,进一步的代码会失败。相同的流程适用于我设置字体和字体大小的选择框,尽管我单击选择框,但文本仍保持选中状态。
我在想,我可以记住选择并选择与焦点移动到颜色框相同的选择。我试图理解tinymce.dom.Selection文档,但它没有帮助。请指导我,因为我在这方面花了很多时间。
谢谢
I'm using tiny mce in my application and applying properties to text using my customized tool bar. I works great on FF and Chrome as well, but on IE, it fails. It is caused by the click event of the color box. I have used mColorPicker plugin to apply color properties, but as I click on the color box in IE8, the selected text is deselected and as selection is null further code fails. The same flow works for select boxes where I set font and font sizes and the text remain selected though I click on the select boxes.
I was thinking that, I can remember the selection and select the same as focus is moved to the color box. I tried to understand the tinymce.dom.Selection documentation, but it could not help. Kindly guide me as I have spent lot of time in this.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该修改负责颜色框的插件或编写自己的插件,以便保存所选元素并稍后对其应用颜色。
You should modify the plugin responable for the color box or write an own plugin in order to save the selected element and apply color to it later.