Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_class on img tag in "text mode" not working #82

Closed
karma4u101 opened this issue Aug 25, 2014 · 5 comments
Closed

set_class on img tag in "text mode" not working #82

karma4u101 opened this issue Aug 25, 2014 · 5 comments

Comments

@karma4u101
Copy link

Using v0.3.2 bootstrap3-wysihtml5.all.js with a options object set as follows adding a image (via the img toolbar button) the set_class attribute will not be added to the img tag (in text mode) until switching to html view (and back).
Has anyone else seen this?
Any fix or workaround available ?

$('#mytxtinput').wysihtml5({
toolbar: {
'html': true,
fa: true
},
parserRules: {
classes: {
'mytxtimg': 1
},
tags: {
'img': {
'set_class': 'mytxtimg'
}
}
}
});

best regards Peter

@Waxolunist
Copy link
Owner

I will have a look into that after releasing the next version.

@Waxolunist Waxolunist added this to the 0.3.4 milestone Sep 8, 2014
@Waxolunist Waxolunist self-assigned this Sep 8, 2014
@karma4u101
Copy link
Author

oki doki thanks, hopefully the new release don't show the same behaviour.

@Waxolunist
Copy link
Owner

I am sorry but the issue still exists. I have written some tests and made a pull requests, so the topic will get some attention (see Voog/wysihtml#81). I will keep you updated, but for the moment I have to put the issue back to the backlog.

@karma4u101
Copy link
Author

Ok, thanks for the effort and updates.

@Waxolunist
Copy link
Owner

The development of bootstrap3-wysiwyg will be continued in a new repo: https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg
@schnawel007 and @Waxolunist are bundling development forces for an even better editor.
This issue will be continued here: bootstrap-wysiwyg/bootstrap3-wysiwyg#82

pulges pushed a commit to Voog/wysihtml that referenced this issue Mar 3, 2015
---

Relates to Waxolunist/bootstrap3-wysihtml5-bower#82

When setting parserRules to add classes, those are not inserted immediately. If a change_view happens for instance, the class of the parser rule is applied. I dont have a solution for this atm, but I have written some tests for it.

You can merge them in, and comment em out, but you have at least the tests for it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants