#5654 closed New Feature (fixed)
Port 'Placeholder' to v3
Reported by: | Garry Yao | Owned by: | Sa'ar Zac Elias |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.5 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Placeholder is one FCKEditor 2.x plugin that introduce a way to present none-editable content in wysiwyg mode, similar with 'fakeobject' but allow dynamic content.
Attachments (8)
Change History (28)
comment:1 Changed 15 years ago by
Milestone: | CKEditor 3.4 → CKEditor 3.5 |
---|
comment:2 Changed 15 years ago by
Owner: | set to Sa'ar Zac Elias |
---|---|
Status: | confirmed → assigned |
comment:3 Changed 15 years ago by
Milestone: | CKEditor 3.4.1 → CKEditor 3.5 |
---|
Changed 15 years ago by
Attachment: | placeholder.gif added |
---|
Changed 15 years ago by
Attachment: | 5654.patch added |
---|
comment:4 Changed 15 years ago by
Status: | assigned → review |
---|
comment:5 Changed 14 years ago by
Status: | review → review_failed |
---|
Changed 14 years ago by
Attachment: | 5654_2.patch added |
---|
comment:6 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:7 Changed 14 years ago by
Status: | review → review_failed |
---|
This is the typical case of "pure plugin" implementation, so let's leave the lang entries into the plugin directory as well.
Changed 14 years ago by
Attachment: | 5654_3.patch added |
---|
comment:8 Changed 14 years ago by
Status: | review_failed → review |
---|
Changed 14 years ago by
Attachment: | 5654_4.patch added |
---|
comment:9 Changed 14 years ago by
Status: | review → review_failed |
---|
The way of how plugin language files loaded is wrong, the plugin system has already 'well established' infrastructure for load lang files, check 'uicolor' as an example.
Besides, double-click should simply opens the placeholder dialog.
Changed 14 years ago by
Attachment: | 5654_5.patch added |
---|
comment:10 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:11 Changed 14 years ago by
Status: | review → review_failed |
---|
The 'doubleclick' processing is too simple that it doesn't fill up dialog correctly, in additional, please use the following lines as sample content:
<p>This is a [[sample placeholder]]. You are using <a href="http://ckeditor.com/">CKEditor</a>. </p>
Changed 14 years ago by
Attachment: | 5654_6.patch added |
---|
comment:12 Changed 14 years ago by
Status: | review_failed → review |
---|
The problem in fact was the detection of the element in the dialog.
comment:13 Changed 14 years ago by
Status: | review → review_failed |
---|
I think the 'onShow' logic is over complicated, how about:
if ( isEdit ) { var range = editor.getSelection().getRanges()[0]; range.shrink( CKEDITOR.SHRINK_TEXT ); var node = range.startContainer; while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.hasAttributes('_cke_placeholder') ) ) node = node.getParent(); this._element = node; }
Changed 14 years ago by
Attachment: | 5654_7.patch added |
---|
comment:14 Changed 14 years ago by
Status: | review_failed → review |
---|
As we talked, there is an unresloved edge case, but we can live with it for now.
comment:15 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:16 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6051].
comment:17 Changed 14 years ago by
Reopen: accidental global var htmlFilter
plugin.js line 89: dataFilter = dataProcessor && dataProcessor.dataFilter; htmlFilter = dataProcessor && dataProcessor.htmlFilter;
There should be a comma instead of semicolon between them, or htmlFilter goes global.
comment:19 follow-up: 20 Changed 14 years ago by
It's an easy hack to YUI Compiler to dump leaked vars, you could integrate in the build, especially easy since you have very few globals.
comment:20 Changed 14 years ago by
Replying to dinu:
It's an easy hack to YUI Compiler to dump leaked vars, you could integrate in the build, especially easy since you have very few globals.
We use JavaScript Lint every once in a while, and always before producing releases. So this thing would get fixed. Thanks for the tip anyway.
Let's update the menu icon, and for plugins that does not get into core, we need a sample page for it.